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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
e3c36850
Commit
e3c36850
authored
Jan 06, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect if we really want a new merge request properly
parent
358501df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
app/controllers/concerns/creates_commit.rb
app/controllers/concerns/creates_commit.rb
+5
-2
No files found.
app/controllers/concerns/creates_commit.rb
View file @
e3c36850
...
...
@@ -92,7 +92,9 @@ module CreatesCommit
end
def
create_merge_request?
params
[
:create_merge_request
].
present?
# XXX: Even if the field is set, if we're checking the same branch
# as the target branch, we don't want to create a merge request.
params
[
:create_merge_request
].
present?
&&
@ref
!=
@target_branch
end
# TODO: We should really clean this up
...
...
@@ -136,6 +138,7 @@ module CreatesCommit
# branch instead of @target_branch.
return
if
create_merge_request?
&&
# XXX: Don't understand why rubocop prefers this indention
@mr_source_project
.
repository
.
branch_exists?
(
@target_branch
)
@target_branch
...
...
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