Update quickcommands to internal status 'draft'/'ready' > 'wip'/'unwip'
requested to merge quatauta/gitlab-contrib:363403-update-quickcommands-draft-state-to-use-draft-instead-wip into master
What does this MR do and why?
This MR updates the internal strings to pass intended draft state back and forth.
Before this MR, the internal state string to change a MR to a draft is wip
. The internal state string to change a MR from draft to ready is unwip
.
- Internal state string
wip
is updated todraft
- Internal state string
unwip
is updated toready
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
List of useful test is to be verified!
- Create merge request
- Test web UI: Take a MR and toggle between draft and ready
- Start GitLab instance with GDK (local or Gitpod)
- Open MR (like default/seeded MR http://127.0.0.1:3000/gitlab-org/gitlab-test/-/merge_requests/1)
- Change between draft/ready status
- Test REST API:
GET /merge_requests?wip=yes
curl -H "PRIVATE-TOKEN:TTTT" 'http://127.0.0.1:3000/api/v4/projects/6/merge_requests?wip=yes' | jq '.[] | {project_id: .project_id, id: .iid, title: .title, draft: .draft}'
- Test GraphQL API Mutation.mergeRequestSetDraft.
- Query MR:
query { project(fullPath: "flightjs/Flight") { mergeRequest(iid: "1") { iid, title, draft } } }
- Change ready
➡ draft:mutation { mergeRequestSetDraft( input: { projectPath: "flightjs/Flight", iid: "1", draft: true } ) { errors, mergeRequest { id, title, draft } } }
- Change draft
➡ ready:mutation { mergeRequestSetDraft( input: { projectPath: "flightjs/Flight", iid: "1", draft: true } ) { errors, mergeRequest { id, title, draft } } }
- Query MR:
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes to #363403 (closed) Changelog: changed
Edited by Daniel Schömer