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
51955c3e
Commit
51955c3e
authored
Nov 10, 2020
by
Nicolò Maria Mezzopera
Committed by
Phil Hughes
Nov 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor mr-widget-wip removeWipMutation to immer
parent
533b95f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
...rge_request_widget/components/states/work_in_progress.vue
+10
-3
app/assets/javascripts/vue_merge_request_widget/index.js
app/assets/javascripts/vue_merge_request_widget/index.js
+6
-1
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue
View file @
51955c3e
<
script
>
import
$
from
'
jquery
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
produce
}
from
'
immer
'
;
import
{
__
}
from
'
~/locale
'
;
import
{
deprecatedCreateFlash
as
createFlash
}
from
'
~/flash
'
;
import
MergeRequest
from
'
~/merge_request
'
;
...
...
@@ -80,12 +81,18 @@ export default {
return
;
}
const
d
ata
=
store
.
readQuery
({
const
sourceD
ata
=
store
.
readQuery
({
query
:
getStateQuery
,
variables
:
mergeRequestQueryVariables
,
});
data
.
project
.
mergeRequest
.
workInProgress
=
workInProgress
;
data
.
project
.
mergeRequest
.
title
=
title
;
const
data
=
produce
(
sourceData
,
draftState
=>
{
// eslint-disable-next-line no-param-reassign
draftState
.
project
.
mergeRequest
.
workInProgress
=
workInProgress
;
// eslint-disable-next-line no-param-reassign
draftState
.
project
.
mergeRequest
.
title
=
title
;
});
store
.
writeQuery
({
query
:
getStateQuery
,
data
,
...
...
app/assets/javascripts/vue_merge_request_widget/index.js
View file @
51955c3e
...
...
@@ -10,7 +10,12 @@ Vue.use(Translate);
Vue
.
use
(
VueApollo
);
const
apolloProvider
=
new
VueApollo
({
defaultClient
:
createDefaultClient
(),
defaultClient
:
createDefaultClient
(
{},
{
assumeImmutableResults
:
true
,
},
),
});
export
default
()
=>
{
...
...
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