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
dcbe7d2b
Commit
dcbe7d2b
authored
Jan 10, 2022
by
Kev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use constants for rebase button keys
parent
e3c4c1fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue
...rge_request_widget/components/states/mr_widget_rebase.vue
+4
-6
app/assets/javascripts/vue_merge_request_widget/constants.js
app/assets/javascripts/vue_merge_request_widget/constants.js
+3
-0
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue
View file @
dcbe7d2b
...
...
@@ -9,9 +9,7 @@ import eventHub from '../../event_hub';
import
mergeRequestQueryVariablesMixin
from
'
../../mixins/merge_request_query_variables
'
;
import
rebaseQuery
from
'
../../queries/states/rebase.query.graphql
'
;
import
statusIcon
from
'
../mr_widget_status_icon.vue
'
;
const
KEY_REBASE
=
'
rebase
'
;
const
KEY_REBASE_WITHOUT_CI
=
'
rebaseWithoutCi
'
;
import
{
REBASE_BUTTON_KEY
,
REBASE_WITHOUT_CI_BUTTON_KEY
}
from
'
../../constants
'
;
export
default
{
name
:
'
MRWidgetRebase
'
,
...
...
@@ -48,7 +46,7 @@ export default {
state
:
{},
isMakingRequest
:
false
,
rebasingError
:
null
,
selectedRebaseAction
:
KEY_REBASE
,
selectedRebaseAction
:
REBASE_BUTTON_KEY
,
};
},
computed
:
{
...
...
@@ -96,7 +94,7 @@ export default {
},
rebaseAction
()
{
return
{
key
:
KEY_REBASE
,
key
:
REBASE_BUTTON_KEY
,
text
:
__
(
'
Rebase
'
),
secondaryText
:
__
(
'
Rebases and triggers a pipeline
'
),
attrs
:
{
...
...
@@ -107,7 +105,7 @@ export default {
},
rebaseWithoutCiAction
()
{
return
{
key
:
KEY_REBASE_WITHOUT_CI
,
key
:
REBASE_WITHOUT_CI_BUTTON_KEY
,
text
:
__
(
'
Rebase without CI
'
),
secondaryText
:
__
(
'
Performs a rebase but skips triggering a new pipeline
'
),
handle
:
()
=>
this
.
rebase
({
skipCi
:
true
}),
...
...
app/assets/javascripts/vue_merge_request_widget/constants.js
View file @
dcbe7d2b
...
...
@@ -162,3 +162,6 @@ export const EXTENSION_SUMMARY_FAILED_CLASS = 'gl-text-red-500';
export
const
EXTENSION_SUMMARY_NEUTRAL_CLASS
=
'
gl-text-gray-700
'
;
export
{
STATE_MACHINE
};
export
const
REBASE_BUTTON_KEY
=
'
rebase
'
;
export
const
REBASE_WITHOUT_CI_BUTTON_KEY
=
'
rebaseWithoutCi
'
;
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