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
91830c7a
Commit
91830c7a
authored
Jan 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
ea5108ad
33607091
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
app/assets/javascripts/vue_merge_request_widget/stores/get_state_key.js
...ascripts/vue_merge_request_widget/stores/get_state_key.js
+2
-2
changelogs/unreleased/mr-rebase-failing-tests.yml
changelogs/unreleased/mr-rebase-failing-tests.yml
+5
-0
spec/javascripts/vue_mr_widget/stores/get_state_key_spec.js
spec/javascripts/vue_mr_widget/stores/get_state_key_spec.js
+24
-0
No files found.
app/assets/javascripts/vue_merge_request_widget/stores/get_state_key.js
View file @
91830c7a
...
...
@@ -13,6 +13,8 @@ export default function deviseState(data) {
return
stateKey
.
conflicts
;
}
else
if
(
data
.
work_in_progress
)
{
return
stateKey
.
workInProgress
;
}
else
if
(
this
.
shouldBeRebased
)
{
return
stateKey
.
rebase
;
}
else
if
(
this
.
onlyAllowMergeIfPipelineSucceeds
&&
this
.
isPipelineFailed
)
{
return
stateKey
.
pipelineFailed
;
}
else
if
(
this
.
hasMergeableDiscussionsState
)
{
...
...
@@ -25,8 +27,6 @@ export default function deviseState(data) {
return
this
.
mergeError
?
stateKey
.
autoMergeFailed
:
stateKey
.
mergeWhenPipelineSucceeds
;
}
else
if
(
!
this
.
canMerge
)
{
return
stateKey
.
notAllowedToMerge
;
}
else
if
(
this
.
shouldBeRebased
)
{
return
stateKey
.
rebase
;
}
else
if
(
this
.
canBeMerged
)
{
return
stateKey
.
readyToMerge
;
}
...
...
changelogs/unreleased/mr-rebase-failing-tests.yml
0 → 100644
View file @
91830c7a
---
title
:
Fixed rebase button not showing in merge request widget
merge_request
:
author
:
type
:
fixed
spec/javascripts/vue_mr_widget/stores/get_state_key_spec.js
View file @
91830c7a
...
...
@@ -76,4 +76,28 @@ describe('getStateKey', () => {
expect
(
bound
()).
toEqual
(
'
archived
'
);
});
it
(
'
returns rebased state key
'
,
()
=>
{
const
context
=
{
mergeStatus
:
'
checked
'
,
mergeWhenPipelineSucceeds
:
false
,
canMerge
:
true
,
onlyAllowMergeIfPipelineSucceeds
:
true
,
isPipelineFailed
:
true
,
hasMergeableDiscussionsState
:
false
,
isPipelineBlocked
:
false
,
canBeMerged
:
false
,
shouldBeRebased
:
true
,
};
const
data
=
{
project_archived
:
false
,
branch_missing
:
false
,
commits_count
:
2
,
has_conflicts
:
false
,
work_in_progress
:
false
,
};
const
bound
=
getStateKey
.
bind
(
context
,
data
);
expect
(
bound
()).
toEqual
(
'
rebase
'
);
});
});
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