Loading
feat(draft_notes): add PublishAllDraftNotesWithOptions
What does this MR do?
Adds PublishAllDraftNotesWithOptions to the draft notes service. The bulk publish endpoint (POST /projects/:id/merge_requests/:iid/draft_notes/bulk_publish) accepts note, internal, and reviewer_state fields to attach a summary comment and set the review state when publishing all pending draft notes, but the current PublishAllDraftNotes cannot pass a body.
- Adds
PublishAllDraftNotesOptions(note,internal,reviewer_state). - Adds a
PublishAllDraftNotesWithOptionssibling method following the existingCancelJobWithOptions/GetJobArtifactsWithOptionsprecedent, deprecated on arrival with a note that the options merge intoPublishAllDraftNotesin 4.0. PublishAllDraftNoteskeeps its exact signature and now delegates with nil options (same shipped pattern asCancelJob); its wire shape is pinned by a test.- Also corrects the doc link on
PublishAllDraftNotes, which pointed at the single-note publish anchor.
Why
Needed by gitlab-org/cli!3909 glab mr note publish command, which publishes a pending review with an optional summary note and reviewer state.
Review notes
- The nil-opt delegation sends a literal
nullJSON body where the old method sent no body — byte-identical to the shippedCancelJob→CancelJobWithOptionsdelegation, and pinned byTestPublishAllDraftNotes.
Edited by Andrei Zubov