Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
99b55697
Commit
99b55697
authored
Dec 14, 2016
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to use those @mr variables for full correctness
parent
56d131dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
app/controllers/concerns/creates_commit.rb
app/controllers/concerns/creates_commit.rb
+6
-4
No files found.
app/controllers/concerns/creates_commit.rb
View file @
99b55697
...
...
@@ -4,14 +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
&&
@repository
.
find_branch
(
@ref
)
source_branch
=
@ref
if
@ref
&&
@mr_source_project
.
repository
.
branch_exists?
(
@ref
)
commit_params
=
@commit_params
.
merge
(
source_project:
@
tree_edit
_project
,
source_project:
@
mr_source
_project
,
source_branch:
source_branch
,
target_branch:
@target_branch
target_branch:
@
mr_
target_branch
)
result
=
service
.
new
(
@project
,
current_user
,
commit_params
).
execute
result
=
service
.
new
(
@mr_target_project
,
current_user
,
commit_params
).
execute
if
result
[
:status
]
==
:success
update_flash_notice
(
success_notice
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment