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
b4297573
Commit
b4297573
authored
Oct 15, 2018
by
Mark Chao
Committed by
Phil Hughes
Oct 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only display merge commit SHA when it exists
parent
0a89c0b8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
12 deletions
+29
-12
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
...rge_request_widget/components/states/mr_widget_merged.vue
+14
-12
changelogs/unreleased/48889-message-for-were-merged-into.yml
changelogs/unreleased/48889-message-for-were-merged-into.yml
+5
-0
spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js
.../vue_mr_widget/components/states/mr_widget_merged_spec.js
+10
-0
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
View file @
b4297573
...
@@ -162,6 +162,7 @@
...
@@ -162,6 +162,7 @@
<span
class=
"label-branch"
>
<span
class=
"label-branch"
>
<a
:href=
"mr.targetBranchPath"
>
{{
mr
.
targetBranch
}}
</a>
<a
:href=
"mr.targetBranchPath"
>
{{
mr
.
targetBranch
}}
</a>
</span>
</span>
<template
v-if=
"mr.mergeCommitSha"
>
with
with
<a
<a
:href=
"mr.mergeCommitPath"
:href=
"mr.mergeCommitPath"
...
@@ -174,6 +175,7 @@
...
@@ -174,6 +175,7 @@
:text=
"mr.mergeCommitSha"
:text=
"mr.mergeCommitSha"
css-class=
"btn-default btn-transparent btn-clipboard js-mr-merged-copy-sha"
css-class=
"btn-default btn-transparent btn-clipboard js-mr-merged-copy-sha"
/>
/>
</
template
>
</p>
</p>
<p
v-if=
"mr.sourceBranchRemoved"
>
<p
v-if=
"mr.sourceBranchRemoved"
>
{{ s__("mrWidget|The source branch has been removed") }}
{{ s__("mrWidget|The source branch has been removed") }}
...
...
changelogs/unreleased/48889-message-for-were-merged-into.yml
0 → 100644
View file @
b4297573
---
title
:
Fix 'merged with' UI being displayed when merge request has no merge commit
merge_request
:
22022
author
:
type
:
fixed
spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js
View file @
b4297573
...
@@ -157,6 +157,16 @@ describe('MRWidgetMerged', () => {
...
@@ -157,6 +157,16 @@ describe('MRWidgetMerged', () => {
expect
(
selectors
.
copyMergeShaButton
.
getAttribute
(
'
data-clipboard-text
'
)).
toBe
(
vm
.
mr
.
mergeCommitSha
);
expect
(
selectors
.
copyMergeShaButton
.
getAttribute
(
'
data-clipboard-text
'
)).
toBe
(
vm
.
mr
.
mergeCommitSha
);
});
});
it
(
'
hides button to copy commit SHA if SHA does not exist
'
,
(
done
)
=>
{
vm
.
mr
.
mergeCommitSha
=
null
;
Vue
.
nextTick
(()
=>
{
expect
(
selectors
.
copyMergeShaButton
).
not
.
toExist
();
expect
(
vm
.
$el
.
querySelector
(
'
.mr-info-list
'
).
innerText
).
not
.
toContain
(
'
with
'
);
done
();
});
});
it
(
'
shows merge commit SHA link
'
,
()
=>
{
it
(
'
shows merge commit SHA link
'
,
()
=>
{
expect
(
selectors
.
mergeCommitShaLink
).
toExist
();
expect
(
selectors
.
mergeCommitShaLink
).
toExist
();
expect
(
selectors
.
mergeCommitShaLink
.
text
).
toContain
(
vm
.
mr
.
shortMergeCommitSha
);
expect
(
selectors
.
mergeCommitShaLink
.
text
).
toContain
(
vm
.
mr
.
shortMergeCommitSha
);
...
...
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