Merge branch 'master' into fixes/api
This commit is contained in:
commit
3bb342b961
4 changed files with 31 additions and 28 deletions
34
README.md
34
README.md
|
@ -1,14 +1,21 @@
|
||||||
# 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
|
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
|
## Application details
|
||||||
|
|
||||||
* based on Ruby on Rails
|
* powered by Ruby on Rails
|
||||||
|
* its completely free and open source
|
||||||
* distributed under the MIT License
|
* distributed under the MIT License
|
||||||
* works with gitolite
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
@ -16,27 +23,16 @@ GitLab is a free project and repository management application
|
||||||
* ruby 1.9.3+
|
* ruby 1.9.3+
|
||||||
* MySQL
|
* MySQL
|
||||||
* git
|
* git
|
||||||
* gitolite
|
* gitlab-shell
|
||||||
* redis
|
* redis
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
Checkout wiki pages for installation information, migration, etc.
|
Checkout [wiki](https://github.com/gitlabhq/gitlabhq/wiki) pages for installation information, migration, etc.
|
||||||
|
|
||||||
## Community
|
## [Community](http://gitlab.org/community/)
|
||||||
|
|
||||||
[Google Group](https://groups.google.com/group/gitlabhq)
|
## [Contact](http://gitlab.org/contact/)
|
||||||
|
|
||||||
## Contacts
|
|
||||||
|
|
||||||
Twitter:
|
|
||||||
|
|
||||||
* @gitlabhq
|
|
||||||
* @dzaporozhets
|
|
||||||
|
|
||||||
Email
|
|
||||||
|
|
||||||
* m@gitlabhq.com
|
|
||||||
|
|
||||||
## Contribute
|
## Contribute
|
||||||
|
|
||||||
|
|
|
@ -177,15 +177,8 @@ class MergeRequest < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def merge!(user_id)
|
def merge!(user_id)
|
||||||
|
self.author_id_of_changes = user_id
|
||||||
self.merge
|
self.merge
|
||||||
|
|
||||||
Event.create(
|
|
||||||
project: self.project,
|
|
||||||
action: Event::MERGED,
|
|
||||||
target_id: self.id,
|
|
||||||
target_type: "MergeRequest",
|
|
||||||
author_id: user_id
|
|
||||||
)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def automerge!(current_user)
|
def automerge!(current_user)
|
||||||
|
|
|
@ -39,4 +39,18 @@ class ActivityObserver < ActiveRecord::Observer
|
||||||
author_id: record.author_id_of_changes
|
author_id: record.author_id_of_changes
|
||||||
)
|
)
|
||||||
end
|
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
|
end
|
||||||
|
|
|
@ -336,7 +336,7 @@ module Gitlab
|
||||||
authorize! :download_code, user_project
|
authorize! :download_code, user_project
|
||||||
|
|
||||||
page = params[:page] || 0
|
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'
|
ref = params[:ref_name] || user_project.try(:default_branch) || 'master'
|
||||||
|
|
||||||
commits = user_project.repository.commits(ref, nil, per_page, page * per_page)
|
commits = user_project.repository.commits(ref, nil, per_page, page * per_page)
|
||||||
|
|
Loading…
Reference in a new issue