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
a4ffdb85
Commit
a4ffdb85
authored
Apr 15, 2021
by
jerasmus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exclude projects dropdown from revert
Ensured that the projects dropdown only shows for cherry-pick
parent
7160f1ad
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
4 deletions
+20
-4
app/assets/javascripts/projects/commit/components/form_modal.vue
...ets/javascripts/projects/commit/components/form_modal.vue
+6
-1
app/assets/javascripts/projects/commit/init_cherry_pick_commit_modal.js
...ascripts/projects/commit/init_cherry_pick_commit_modal.js
+1
-0
changelogs/unreleased/exclude-projects-dropdown-from-revert.yml
...logs/unreleased/exclude-projects-dropdown-from-revert.yml
+5
-0
spec/frontend/projects/commit/components/form_modal_spec.js
spec/frontend/projects/commit/components/form_modal_spec.js
+8
-3
No files found.
app/assets/javascripts/projects/commit/components/form_modal.vue
View file @
a4ffdb85
...
@@ -37,6 +37,11 @@ export default {
...
@@ -37,6 +37,11 @@ export default {
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
isCherryPick
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -111,7 +116,7 @@ export default {
...
@@ -111,7 +116,7 @@ export default {
<input
type=
"hidden"
name=
"authenticity_token"
:value=
"$options.csrf.token"
/>
<input
type=
"hidden"
name=
"authenticity_token"
:value=
"$options.csrf.token"
/>
<gl-form-group
<gl-form-group
v-if=
"glFeatures.pickIntoProject"
v-if=
"glFeatures.pickIntoProject
&& isCherryPick
"
:label=
"i18n.projectLabel"
:label=
"i18n.projectLabel"
label-for=
"start_project"
label-for=
"start_project"
data-testid=
"dropdown-group"
data-testid=
"dropdown-group"
...
...
app/assets/javascripts/projects/commit/init_cherry_pick_commit_modal.js
View file @
a4ffdb85
...
@@ -51,6 +51,7 @@ export default function initInviteMembersModal() {
...
@@ -51,6 +51,7 @@ export default function initInviteMembersModal() {
i18n
:
{
...
I18N_CHERRY_PICK_MODAL
,
...
I18N_MODAL
},
i18n
:
{
...
I18N_CHERRY_PICK_MODAL
,
...
I18N_MODAL
},
openModal
:
OPEN_CHERRY_PICK_MODAL
,
openModal
:
OPEN_CHERRY_PICK_MODAL
,
modalId
:
CHERRY_PICK_MODAL_ID
,
modalId
:
CHERRY_PICK_MODAL_ID
,
isCherryPick
:
true
,
},
},
}),
}),
});
});
...
...
changelogs/unreleased/exclude-projects-dropdown-from-revert.yml
0 → 100644
View file @
a4ffdb85
---
title
:
Exclude projects dropdown from revert modal
merge_request
:
59504
author
:
type
:
fixed
spec/frontend/projects/commit/components/form_modal_spec.js
View file @
a4ffdb85
...
@@ -17,15 +17,14 @@ describe('CommitFormModal', () => {
...
@@ -17,15 +17,14 @@ describe('CommitFormModal', () => {
let
store
;
let
store
;
let
axiosMock
;
let
axiosMock
;
const
createComponent
=
(
method
,
state
=
{},
provide
=
{})
=>
{
const
createComponent
=
(
method
,
state
=
{},
provide
=
{}
,
propsData
=
{}
)
=>
{
store
=
createStore
({
...
mockData
.
mockModal
,
...
state
});
store
=
createStore
({
...
mockData
.
mockModal
,
...
state
});
wrapper
=
extendedWrapper
(
wrapper
=
extendedWrapper
(
method
(
CommitFormModal
,
{
method
(
CommitFormModal
,
{
provide
:
{
provide
:
{
...
provide
,
...
provide
,
glFeatures
:
{
pickIntoProject
:
true
},
},
},
propsData
:
{
...
mockData
.
modalPropsData
},
propsData
:
{
...
mockData
.
modalPropsData
,
...
propsData
},
store
,
store
,
attrs
:
{
attrs
:
{
static
:
true
,
static
:
true
,
...
@@ -160,6 +159,12 @@ describe('CommitFormModal', () => {
...
@@ -160,6 +159,12 @@ describe('CommitFormModal', () => {
});
});
it
(
'
Changes the target_project_id input value
'
,
async
()
=>
{
it
(
'
Changes the target_project_id input value
'
,
async
()
=>
{
createComponent
(
shallowMount
,
{},
{
glFeatures
:
{
pickIntoProject
:
true
}
},
{
isCherryPick
:
true
},
);
findProjectsDropdown
().
vm
.
$emit
(
'
selectProject
'
,
'
_changed_project_value_
'
);
findProjectsDropdown
().
vm
.
$emit
(
'
selectProject
'
,
'
_changed_project_value_
'
);
await
wrapper
.
vm
.
$nextTick
();
await
wrapper
.
vm
.
$nextTick
();
...
...
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