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
Boxiang Sun
gitlab-ce
Commits
1533dbf9
Commit
1533dbf9
authored
Jun 18, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uses long sha version of the merged commit in MR widget copy to clipboard button
parent
2a82179e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
3 deletions
+10
-3
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
...rge_request_widget/components/states/mr_widget_merged.vue
+1
-1
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
...cripts/vue_merge_request_widget/stores/mr_widget_store.js
+1
-0
changelogs/unreleased/48050-add-full-commit-sha.yml
changelogs/unreleased/48050-add-full-commit-sha.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
+3
-2
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue
View file @
1533dbf9
...
...
@@ -173,7 +173,7 @@
</a>
<clipboard-button
:title=
"__('Copy commit SHA to clipboard')"
:text=
"mr.
shortM
ergeCommitSha"
:text=
"mr.
m
ergeCommitSha"
css-class=
"btn-default btn-transparent btn-clipboard js-mr-merged-copy-sha"
/>
</p>
...
...
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
View file @
1533dbf9
...
...
@@ -26,6 +26,7 @@ export default class MergeRequestStore {
this
.
mergeStatus
=
data
.
merge_status
;
this
.
commitMessage
=
data
.
merge_commit_message
;
this
.
shortMergeCommitSha
=
data
.
short_merge_commit_sha
;
this
.
mergeCommitSha
=
data
.
merge_commit_sha
;
this
.
commitMessageWithDescription
=
data
.
merge_commit_message_with_description
;
this
.
commitsCount
=
data
.
commits_count
;
this
.
divergedCommitsCount
=
data
.
diverged_commits_count
;
...
...
changelogs/unreleased/48050-add-full-commit-sha.yml
0 → 100644
View file @
1533dbf9
---
title
:
Uses long sha version of the merged commit in MR widget copy to clipboard button
merge_request
:
19955
author
:
type
:
other
spec/javascripts/vue_mr_widget/components/states/mr_widget_merged_spec.js
View file @
1533dbf9
...
...
@@ -39,7 +39,8 @@ describe('MRWidgetMerged', () => {
readableClosedAt
:
''
,
},
updatedAt
:
'
mergedUpdatedAt
'
,
shortMergeCommitSha
:
'
asdf1234
'
,
shortMergeCommitSha
:
'
958c0475
'
,
mergeCommitSha
:
'
958c047516e182dfc52317f721f696e8a1ee85ed
'
,
mergeCommitPath
:
'
http://localhost:3000/root/nautilus/commit/f7ce827c314c9340b075657fd61c789fb01cf74d
'
,
sourceBranch
:
'
bar
'
,
targetBranch
,
...
...
@@ -153,7 +154,7 @@ describe('MRWidgetMerged', () => {
it
(
'
shows button to copy commit SHA to clipboard
'
,
()
=>
{
expect
(
selectors
.
copyMergeShaButton
).
toExist
();
expect
(
selectors
.
copyMergeShaButton
.
getAttribute
(
'
data-clipboard-text
'
)).
toBe
(
vm
.
mr
.
shortM
ergeCommitSha
);
expect
(
selectors
.
copyMergeShaButton
.
getAttribute
(
'
data-clipboard-text
'
)).
toBe
(
vm
.
mr
.
m
ergeCommitSha
);
});
it
(
'
shows merge commit SHA link
'
,
()
=>
{
...
...
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