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
c027ebfb
Commit
c027ebfb
authored
Apr 24, 2019
by
Natalia Tepluhina
Committed by
Phil Hughes
Apr 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move EE differences for `ready_to_merge.vue`
parent
e0b6a577
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
13 deletions
+32
-13
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
...merge_request_widget/components/states/ready_to_merge.vue
+2
-13
app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js
...scripts/vue_merge_request_widget/mixins/ready_to_merge.js
+13
-0
ee/app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js
...scripts/vue_merge_request_widget/mixins/ready_to_merge.js
+17
-0
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
View file @
c027ebfb
...
@@ -3,6 +3,7 @@ import successSvg from 'icons/_icon_status_success.svg';
...
@@ -3,6 +3,7 @@ import successSvg from 'icons/_icon_status_success.svg';
import
warningSvg
from
'
icons/_icon_status_warning.svg
'
;
import
warningSvg
from
'
icons/_icon_status_warning.svg
'
;
import
simplePoll
from
'
~/lib/utils/simple_poll
'
;
import
simplePoll
from
'
~/lib/utils/simple_poll
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
__
}
from
'
~/locale
'
;
import
readyToMergeMixin
from
'
ee_else_ce/vue_merge_request_widget/mixins/ready_to_merge
'
;
import
MergeRequest
from
'
../../../merge_request
'
;
import
MergeRequest
from
'
../../../merge_request
'
;
import
Flash
from
'
../../../flash
'
;
import
Flash
from
'
../../../flash
'
;
import
statusIcon
from
'
../mr_widget_status_icon.vue
'
;
import
statusIcon
from
'
../mr_widget_status_icon.vue
'
;
...
@@ -21,6 +22,7 @@ export default {
...
@@ -21,6 +22,7 @@ export default {
CommitEdit
,
CommitEdit
,
CommitMessageDropdown
,
CommitMessageDropdown
,
},
},
mixins
:
[
readyToMergeMixin
],
props
:
{
props
:
{
mr
:
{
type
:
Object
,
required
:
true
},
mr
:
{
type
:
Object
,
required
:
true
},
service
:
{
type
:
Object
,
required
:
true
},
service
:
{
type
:
Object
,
required
:
true
},
...
@@ -94,16 +96,6 @@ export default {
...
@@ -94,16 +96,6 @@ export default {
shouldShowMergeOptionsDropdown
()
{
shouldShowMergeOptionsDropdown
()
{
return
this
.
mr
.
isPipelineActive
&&
!
this
.
mr
.
onlyAllowMergeIfPipelineSucceeds
;
return
this
.
mr
.
isPipelineActive
&&
!
this
.
mr
.
onlyAllowMergeIfPipelineSucceeds
;
},
},
isMergeButtonDisabled
()
{
const
{
commitMessage
}
=
this
;
return
Boolean
(
!
commitMessage
.
length
||
!
this
.
shouldShowMergeControls
||
this
.
isMakingRequest
||
this
.
isApprovalNeeded
||
this
.
mr
.
preventMerge
,
);
},
isRemoveSourceBranchButtonDisabled
()
{
isRemoveSourceBranchButtonDisabled
()
{
return
this
.
isMergeButtonDisabled
;
return
this
.
isMergeButtonDisabled
;
},
},
...
@@ -111,9 +103,6 @@ export default {
...
@@ -111,9 +103,6 @@ export default {
const
{
commitsCount
,
enableSquashBeforeMerge
}
=
this
.
mr
;
const
{
commitsCount
,
enableSquashBeforeMerge
}
=
this
.
mr
;
return
enableSquashBeforeMerge
&&
commitsCount
>
1
;
return
enableSquashBeforeMerge
&&
commitsCount
>
1
;
},
},
isApprovalNeeded
()
{
return
this
.
mr
.
hasApprovalsAvailable
?
!
this
.
mr
.
isApproved
:
false
;
},
shouldShowMergeControls
()
{
shouldShowMergeControls
()
{
return
this
.
mr
.
isMergeAllowed
||
this
.
shouldShowMergeWhenPipelineSucceedsText
;
return
this
.
mr
.
isMergeAllowed
||
this
.
shouldShowMergeWhenPipelineSucceedsText
;
},
},
...
...
app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js
0 → 100644
View file @
c027ebfb
export
default
{
computed
:
{
isMergeButtonDisabled
()
{
const
{
commitMessage
}
=
this
;
return
Boolean
(
!
commitMessage
.
length
||
!
this
.
shouldShowMergeControls
||
this
.
isMakingRequest
||
this
.
mr
.
preventMerge
,
);
},
},
};
ee/app/assets/javascripts/vue_merge_request_widget/mixins/ready_to_merge.js
0 → 100644
View file @
c027ebfb
export
default
{
computed
:
{
isApprovalNeeded
()
{
return
this
.
mr
.
hasApprovalsAvailable
?
!
this
.
mr
.
isApproved
:
false
;
},
isMergeButtonDisabled
()
{
const
{
commitMessage
}
=
this
;
return
Boolean
(
!
commitMessage
.
length
||
!
this
.
shouldShowMergeControls
||
this
.
isMakingRequest
||
this
.
isApprovalNeeded
||
this
.
mr
.
preventMerge
,
);
},
},
};
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