diff options
author | Scott Le <scott.lee318@gmail.com> | 2016-07-28 07:04:57 +0300 |
---|---|---|
committer | Scott Le <scott.lee318@gmail.com> | 2016-08-11 19:37:00 +0300 |
commit | 6109daf480327581b6e2dcdfffe90464be6c7796 (patch) | |
tree | 813f1d607d89c94873ae31633acb9091c8a0e287 /lib/gitlab/git_access.rb | |
parent | 5a33bc984abfb4ee6243c00bbcc71ccd086d2266 (diff) |
api for generating new merge request
DRY code + fix rubocop
Add more test cases
Append to changelog
DRY changes list
find_url service for merge_requests
use GET for getting merge request links
remove files
rename to get_url_service
reduce loop
add test case for cross project
refactor tiny thing
update changelog
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r-- | lib/gitlab/git_access.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index 5bc70f530d2..1882eb8d050 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -76,10 +76,10 @@ module Gitlab return build_status_object(false, "A repository for this project does not exist yet.") end - changes = changes.lines if changes.kind_of?(String) + changes_list = Gitlab::ChangesList.new(changes) # Iterate over all changes to find if user allowed all of them to be applied - changes.map(&:strip).reject(&:blank?).each do |change| + changes_list.each do |change| status = change_access_check(change) unless status.allowed? # If user does not have access to make at least one change - cancel all push |