BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3bb342b9
Commit
3bb342b9
authored
Feb 27, 2013
by
Sebastian Ziebell
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into fixes/api
parents
7499f650
33cd1ae9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
28 deletions
+31
-28
README.md
README.md
+15
-19
merge_request.rb
app/models/merge_request.rb
+1
-8
activity_observer.rb
app/observers/activity_observer.rb
+14
-0
projects.rb
lib/api/projects.rb
+1
-1
No files found.
README.md
View file @
3bb342b9
# Welcome to GitLab [![build status](https://secure.travis-ci.org/gitlabhq/gitlabhq.png)](https://travis-ci.org/gitlabhq/gitlabhq) [![build status](https://secure.travis-ci.org/gitlabhq/grit.png)](https://travis-ci.org/gitlabhq/grit) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/gitlabhq/gitlabhq) [![Dependency Status](https://gemnasium.com/gitlabhq/gitlabhq.png)](https://gemnasium.com/gitlabhq/gitlabhq)
# Welcome to GitLab! Self hosted Git management software
## Badges:
*
master: travis-ci.org
[
![build status
](
https://secure.travis-ci.org/gitlabhq/gitlabhq.png
)
](https://travis-ci.org/gitlabhq/gitlabhq)a
*
master: ci.gitlab.org
[
![CI
](
http://ci.gitlab.org/projects/1/status?ref=master
)
](http://ci.gitlab.org/projects/1?ref=master)
*
[
![Code Climate
](
https://codeclimate.com/badge.png
)
](https://codeclimate.com/github/gitlabhq/gitlabhq)
*
[
![Dependency Status
](
https://gemnasium.com/gitlabhq/gitlabhq.png
)
](https://gemnasium.com/gitlabhq/gitlabhq)
GitLab is a free project and repository management application
[
![CI
](
http://ci.gitlab.org/projects/1/status?ref=master
)
](http://ci.gitlab.org/projects/1?ref=master)
## Application details
*
based on Ruby on Rails
*
powered by Ruby on Rails
*
its completely free and open source
*
distributed under the MIT License
*
works with gitolite
## Requirements
...
...
@@ -16,27 +23,16 @@ GitLab is a free project and repository management application
*
ruby 1.9.3+
*
MySQL
*
git
*
git
olite
*
git
lab-shell
*
redis
## Install
Checkout wiki pages for installation information, migration, etc.
## Community
[
Google Group
](
https://groups.google.com/group/gitlabhq
)
## Contacts
Twitter:
*
@gitlabhq
*
@dzaporozhets
Checkout
[
wiki
](
https://github.com/gitlabhq/gitlabhq/wiki
)
pages for installation information, migration, etc.
Email
## [Community](http://gitlab.org/community/)
*
m@gitlabhq.com
## [Contact](http://gitlab.org/contact/)
## Contribute
...
...
app/models/merge_request.rb
View file @
3bb342b9
...
...
@@ -177,15 +177,8 @@ class MergeRequest < ActiveRecord::Base
end
def
merge!
(
user_id
)
self
.
author_id_of_changes
=
user_id
self
.
merge
Event
.
create
(
project:
self
.
project
,
action:
Event
::
MERGED
,
target_id:
self
.
id
,
target_type:
"MergeRequest"
,
author_id:
user_id
)
end
def
automerge!
(
current_user
)
...
...
app/observers/activity_observer.rb
View file @
3bb342b9
...
...
@@ -39,4 +39,18 @@ class ActivityObserver < ActiveRecord::Observer
author_id:
record
.
author_id_of_changes
)
end
def
after_merge
(
record
,
transition
)
# Since MR can be merged via sidekiq
# to prevent event duplication do this check
return
true
if
record
.
merge_event
Event
.
create
(
project:
record
.
project
,
target_id:
record
.
id
,
target_type:
record
.
class
.
name
,
action:
Event
::
MERGED
,
author_id:
record
.
author_id_of_changes
)
end
end
lib/api/projects.rb
View file @
3bb342b9
...
...
@@ -336,7 +336,7 @@ module Gitlab
authorize!
:download_code
,
user_project
page
=
params
[
:page
]
||
0
per_page
=
params
[
:per_page
].
to_i
||
20
per_page
=
(
params
[
:per_page
]
||
20
).
to_i
ref
=
params
[
:ref_name
]
||
user_project
.
try
(
:default_branch
)
||
'master'
commits
=
user_project
.
repository
.
commits
(
ref
,
nil
,
per_page
,
page
*
per_page
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment