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
a21d6ee0
Commit
a21d6ee0
authored
May 17, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure MergeRequestStore sha value never changes after instantiation
parent
0b946a7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
...cripts/vue_merge_request_widget/stores/mr_widget_store.js
+2
-3
No files found.
app/assets/javascripts/vue_merge_request_widget/stores/mr_widget_store.js
View file @
a21d6ee0
...
@@ -4,7 +4,7 @@ import { getStateKey } from '../dependencies';
...
@@ -4,7 +4,7 @@ import { getStateKey } from '../dependencies';
export
default
class
MergeRequestStore
{
export
default
class
MergeRequestStore
{
constructor
(
data
)
{
constructor
(
data
)
{
this
.
s
tartingS
ha
=
data
.
diff_head_sha
;
this
.
sha
=
data
.
diff_head_sha
;
this
.
setData
(
data
);
this
.
setData
(
data
);
}
}
...
@@ -16,7 +16,6 @@ export default class MergeRequestStore {
...
@@ -16,7 +16,6 @@ export default class MergeRequestStore {
this
.
targetBranch
=
data
.
target_branch
;
this
.
targetBranch
=
data
.
target_branch
;
this
.
sourceBranch
=
data
.
source_branch
;
this
.
sourceBranch
=
data
.
source_branch
;
this
.
mergeStatus
=
data
.
merge_status
;
this
.
mergeStatus
=
data
.
merge_status
;
this
.
sha
=
data
.
diff_head_sha
;
this
.
commitMessage
=
data
.
merge_commit_message
;
this
.
commitMessage
=
data
.
merge_commit_message
;
this
.
commitMessageWithDescription
=
data
.
merge_commit_message_with_description
;
this
.
commitMessageWithDescription
=
data
.
merge_commit_message_with_description
;
this
.
commitsCount
=
data
.
commits_count
;
this
.
commitsCount
=
data
.
commits_count
;
...
@@ -69,7 +68,7 @@ export default class MergeRequestStore {
...
@@ -69,7 +68,7 @@ export default class MergeRequestStore {
this
.
canMerge
=
!!
data
.
merge_path
;
this
.
canMerge
=
!!
data
.
merge_path
;
this
.
canCreateIssue
=
currentUser
.
can_create_issue
||
false
;
this
.
canCreateIssue
=
currentUser
.
can_create_issue
||
false
;
this
.
canCancelAutomaticMerge
=
!!
data
.
cancel_merge_when_pipeline_succeeds_path
;
this
.
canCancelAutomaticMerge
=
!!
data
.
cancel_merge_when_pipeline_succeeds_path
;
this
.
hasSHAChanged
=
this
.
sha
!==
this
.
startingS
ha
;
this
.
hasSHAChanged
=
this
.
sha
!==
data
.
diff_head_s
ha
;
this
.
canBeMerged
=
data
.
can_be_merged
||
false
;
this
.
canBeMerged
=
data
.
can_be_merged
||
false
;
// Cherry-pick and Revert actions related
// Cherry-pick and Revert actions related
...
...
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