Uses long sha version of the merged commit in MR widget copy to clipboard button
This commit is contained in:
parent
2a82179e10
commit
1533dbf901
|
@ -173,7 +173,7 @@
|
|||
</a>
|
||||
<clipboard-button
|
||||
:title="__('Copy commit SHA to clipboard')"
|
||||
:text="mr.shortMergeCommitSha"
|
||||
:text="mr.mergeCommitSha"
|
||||
css-class="btn-default btn-transparent btn-clipboard js-mr-merged-copy-sha"
|
||||
/>
|
||||
</p>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Uses long sha version of the merged commit in MR widget copy to clipboard button
|
||||
merge_request: 19955
|
||||
author:
|
||||
type: other
|
|
@ -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.shortMergeCommitSha);
|
||||
expect(selectors.copyMergeShaButton.getAttribute('data-clipboard-text')).toBe(vm.mr.mergeCommitSha);
|
||||
});
|
||||
|
||||
it('shows merge commit SHA link', () => {
|
||||
|
|
Loading…
Reference in New Issue