Skip to content

Update quickcommands to internal status 'draft'/'ready' > 'wip'/'unwip'

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 to draft
  • Internal state string unwip is updated to ready

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!

  1. Create merge request
  2. Test web UI: Take a MR and toggle between draft and ready
    1. Start GitLab instance with GDK (local or Gitpod)
    2. Open MR (like default/seeded MR http://127.0.0.1:3000/gitlab-org/gitlab-test/-/merge_requests/1)
    3. Change between draft/ready status
  3. Test REST API: GET /merge_requests?wip=yes
    1. 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}'
  4. Test GraphQL API Mutation.mergeRequestSetDraft.
    1. Query MR: query { project(fullPath: "flightjs/Flight") { mergeRequest(iid: "1") { iid, title, draft } } }
    2. Change ready draft: mutation { mergeRequestSetDraft( input: { projectPath: "flightjs/Flight", iid: "1", draft: true } ) { errors, mergeRequest { id, title, draft } } }
    3. Change draft ready: mutation { mergeRequestSetDraft( input: { projectPath: "flightjs/Flight", iid: "1", draft: true } ) { errors, mergeRequest { id, title, draft } } }

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes to #363403 (closed) Changelog: changed

Edited by Daniel Schömer

Merge request reports

Loading