Skip to content
Snippets Groups Projects
Commit a68a6201 authored by Lin Jen-Shin's avatar Lin Jen-Shin
Browse files

Don't pass source_branch if it doesn't exist

parent d8fe2fac
No related branches found
No related tags found
Loading
Loading
@@ -4,9 +4,10 @@ module CreatesCommit
Loading
@@ -4,9 +4,10 @@ module CreatesCommit
def create_commit(service, success_path:, failure_path:, failure_view: nil, success_notice: nil) def create_commit(service, success_path:, failure_path:, failure_view: nil, success_notice: nil)
set_commit_variables set_commit_variables
   
source_branch = @ref if @repository.find_branch(@ref)
commit_params = @commit_params.merge( commit_params = @commit_params.merge(
source_project: @project, source_project: @project,
source_branch: @ref, source_branch: source_branch,
target_branch: @target_branch target_branch: @target_branch
) )
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment