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
Jérome Perrin
gitlab-ce
Commits
80915c35
Commit
80915c35
authored
Nov 24, 2016
by
Gabriel Gizotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diplays mentioned but not merged message on MR show page
parent
1a8f43ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+11
-0
app/views/projects/merge_requests/widget/_open.html.haml
app/views/projects/merge_requests/widget/_open.html.haml
+9
-0
No files found.
app/helpers/merge_requests_helper.rb
View file @
80915c35
...
@@ -59,6 +59,17 @@ module MergeRequestsHelper
...
@@ -59,6 +59,17 @@ module MergeRequestsHelper
@mr_closes_issues
||=
@merge_request
.
closes_issues
@mr_closes_issues
||=
@merge_request
.
closes_issues
end
end
def
mr_issues_mentioned_but_not_closing
@mr_issues_mentioned_but_not_closing
||=
@merge_request
.
issues_mentioned_but_not_closing
end
def
mr_issues_mentioned_but_not_closing_message
verb
=
mr_issues_mentioned_but_not_closing
.
size
>
1
?
'are'
:
'is'
issue_text
=
'issue'
.
pluralize
(
mr_issues_mentioned_but_not_closing
.
size
)
"The following
#{
issue_text
}
#{
verb
}
mentioned but not being closed:"
end
def
mr_change_branches_path
(
merge_request
)
def
mr_change_branches_path
(
merge_request
)
new_namespace_project_merge_request_path
(
new_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@project
.
namespace
,
@project
,
...
...
app/views/projects/merge_requests/widget/_open.html.haml
View file @
80915c35
...
@@ -30,6 +30,15 @@
...
@@ -30,6 +30,15 @@
-
elsif
@merge_request
.
can_be_merged?
||
resolved_conflicts
-
elsif
@merge_request
.
can_be_merged?
||
resolved_conflicts
=
render
'projects/merge_requests/widget/open/accept'
=
render
'projects/merge_requests/widget/open/accept'
-
if
mr_issues_mentioned_but_not_closing
.
present?
.mr-widget-footer
%span
%i
.fa.fa-warning
=
mr_issues_mentioned_but_not_closing_message
=
succeed
'.'
do
!=
markdown
issues_sentence
(
mr_issues_mentioned_but_not_closing
),
pipeline: :gfm
,
author:
@merge_request
.
author
=
mr_assign_issues_link
-
if
mr_closes_issues
.
present?
-
if
mr_closes_issues
.
present?
.mr-widget-footer
.mr-widget-footer
%span
%span
...
...
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