diff options
| author | Douwe Maan <douwe@gitlab.com> | 2017-02-02 23:26:35 +0000 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2017-02-02 23:26:35 +0000 |
| commit | e7d530a624fbb8854047c3983eaa0972a19f36c8 (patch) | |
| tree | 92f77913a359ccf4078cf010add02d8b8f765490 /lib/api | |
| parent | dce77b1d6d5e2b82441a685d385ee809c6b35b76 (diff) | |
| parent | 54fca95160389fe7993df5d82635b83804833fee (diff) | |
| download | gitlab-ce-e7d530a624fbb8854047c3983eaa0972a19f36c8.tar.gz | |
Merge branch 'fix-git-hooks-when-creating-file' into 'master'
Don't execute git hooks if you create branch as part of other change
Closes #23439
See merge request !7237
Diffstat (limited to 'lib/api')
| -rw-r--r-- | lib/api/commits.rb | 4 | ||||
| -rw-r--r-- | lib/api/files.rb | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb index e6d707f3c3d..2fefe760d24 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -54,7 +54,7 @@ module API authorize! :push_code, user_project attrs = declared_params - attrs[:source_branch] = attrs[:branch_name] + attrs[:start_branch] = attrs[:branch_name] attrs[:target_branch] = attrs[:branch_name] attrs[:actions].map! do |action| action[:action] = action[:action].to_sym @@ -139,8 +139,6 @@ module API commit_params = { commit: commit, create_merge_request: false, - source_project: user_project, - source_branch: commit.cherry_pick_branch_name, target_branch: params[:branch] } diff --git a/lib/api/files.rb b/lib/api/files.rb index 2e79e22e649..c58472de578 100644 --- a/lib/api/files.rb +++ b/lib/api/files.rb @@ -5,7 +5,7 @@ module API def commit_params(attrs) { file_path: attrs[:file_path], - source_branch: attrs[:branch_name], + start_branch: attrs[:branch_name], target_branch: attrs[:branch_name], commit_message: attrs[:commit_message], file_content: attrs[:content], |
