Skip to content
Snippets Groups Projects

Don't execute git hooks if you create branch as part of other change

Merged Kamil Trzciński requested to merge fix-git-hooks-when-creating-file into master
All threads resolved!
Compare and
34 files
+ 835
393
Compare changes
  • Side-by-side
  • Inline
Files
34
@@ -4,13 +4,16 @@ module CreatesCommit
def create_commit(service, success_path:, failure_path:, failure_view: nil, success_notice: nil)
set_commit_variables
source_branch = @ref if
@ref && @mr_source_project.repository.branch_exists?(@ref)
commit_params = @commit_params.merge(
source_project: @project,
source_branch: @ref,
target_branch: @target_branch
source_project: @mr_source_project,
source_branch: source_branch,
target_branch: @mr_target_branch
)
result = service.new(@tree_edit_project, current_user, commit_params).execute
result = service.new(
@tree_edit_project, current_user, commit_params).execute
if result[:status] == :success
update_flash_notice(success_notice)
Loading