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
f4ebe0e5
Commit
f4ebe0e5
authored
Mar 09, 2017
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only replace non-approval mr-widget-footer on getMergeStatus.
parent
80d3020c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
app/assets/javascripts/merge_request_widget.js
app/assets/javascripts/merge_request_widget.js
+1
-1
changelogs/unreleased-ee/mr-widget-approval-regression.yml
changelogs/unreleased-ee/mr-widget-approval-regression.yml
+4
-0
spec/features/merge_requests/closes_issues_spec.rb
spec/features/merge_requests/closes_issues_spec.rb
+16
-0
No files found.
app/assets/javascripts/merge_request_widget.js
View file @
f4ebe0e5
...
...
@@ -149,7 +149,7 @@ require('./smart_interval');
var
$html
=
$
(
data
);
this
.
updateMergeButton
(
this
.
status
,
this
.
hasCi
,
$html
);
$
(
'
.mr-widget-body
'
).
replaceWith
(
$html
.
find
(
'
.mr-widget-body
'
));
$
(
'
.mr-widget-footer
'
).
replaceWith
(
$html
.
find
(
'
.mr-widget-footer
'
));
$
(
'
.mr-widget-footer
:not(.mr-approvals-footer)
'
).
replaceWith
(
$html
.
find
(
'
.mr-widget-footer:not(.mr-approvals-footer)
'
));
$
(
'
.approvals-components
'
).
replaceWith
(
$html
.
find
(
'
.approvals-components
'
));
if
(
gl
.
compileApprovalsWidget
)
{
...
...
changelogs/unreleased-ee/mr-widget-approval-regression.yml
0 → 100644
View file @
f4ebe0e5
---
title
:
Only replace non-approval mr-widget-footer on getMergeStatus.
merge_request
:
author
:
spec/features/merge_requests/closes_issues_spec.rb
View file @
f4ebe0e5
require
'spec_helper'
feature
'Merge Request closing issues message'
,
feature:
true
do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:issue_1
)
{
create
(
:issue
,
project:
project
)}
...
...
@@ -78,4 +80,18 @@ feature 'Merge Request closing issues message', feature: true do
expect
(
page
).
to
have_content
(
"Accepting this merge request will close issue
#{
issue_1
.
to_reference
}
. Issue
#{
issue_2
.
to_reference
}
is mentioned but will not be closed."
)
end
end
context
'approvals are enabled while closing issues'
,
js:
true
do
before
do
project
.
team
<<
[
user
,
:developer
]
end
let
(
:project
)
{
create
(
:project
,
:public
,
approvals_before_merge:
1
)
}
let
(
:merge_request_description
)
{
"Description
\n\n
closing
#{
issue_1
.
to_reference
}
,
#{
issue_2
.
to_reference
}
"
}
it
'displays closing issue message exactly one time'
do
wait_for_ajax
expect
(
page
).
to
have_content
(
"Accepting this merge request will close issues
#{
issue_1
.
to_reference
}
and
#{
issue_2
.
to_reference
}
"
,
count:
1
)
end
end
end
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