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
f40e8837
Commit
f40e8837
authored
Jan 06, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix remove source branch link
parent
ae93ac20
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+12
-0
app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml
...requests/widget/open/_merge_when_build_succeeds.html.haml
+1
-1
No files found.
app/helpers/merge_requests_helper.rb
View file @
f40e8837
...
...
@@ -181,4 +181,16 @@ module MergeRequestsHelper
def
different_base?
(
version1
,
version2
)
version1
&&
version2
&&
version1
.
base_commit_sha
!=
version2
.
base_commit_sha
end
def
merge_params
(
merge_request
)
{
merge_when_build_succeeds:
true
,
should_remove_source_branch:
true
,
sha:
merge_request
.
diff_head_sha
}.
merge
(
merge_params_ee
(
merge_request
))
end
def
merge_params_ee
(
merge_request
)
{
squash:
merge_request
.
squash
}
end
end
app/views/projects/merge_requests/widget/open/_merge_when_build_succeeds.html.haml
View file @
f40e8837
...
...
@@ -24,7 +24,7 @@
-
if
remove_source_branch_button
||
user_can_cancel_automatic_merge
.clearfix.prepend-top-10
-
if
remove_source_branch_button
=
link_to
merge_namespace_project_merge_request_path
(
@merge_request
.
target_project
.
namespace
,
@merge_request
.
target_project
,
@merge_request
,
merge_
when_build_succeeds:
true
,
should_remove_source_branch:
true
,
sha:
@merge_request
.
diff_head_sha
),
remote:
true
,
method: :post
,
class:
"btn btn-grouped btn-primary btn-sm remove_source_branch"
do
=
link_to
merge_namespace_project_merge_request_path
(
@merge_request
.
target_project
.
namespace
,
@merge_request
.
target_project
,
@merge_request
,
merge_
params
(
@merge_request
)
),
remote:
true
,
method: :post
,
class:
"btn btn-grouped btn-primary btn-sm remove_source_branch"
do
=
icon
(
'times'
)
Remove Source Branch When Merged
...
...
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