git.merge-queue.addAdd a pull request to its target branch merge queue ("merge when ready")
Only for a target branch whose protection rule requires a merge queue. If approvals or checks are not yet satisfied the entry waits (state `waiting`) and joins the end of the line once they are. The queue builds `ews-readonly-queue/<base>/pr-<n>-<sha>` with every pull request ahead of it, runs `merge_group` CI on it, and fast-forwards the base when the checks pass.
Request syntax
POST /git/api/repositories/{repoId}/pulls/{prNumber}/merge-queuePath parameters
repoIdRequiredstring
Constraints: uuid
prNumberRequirednumber
Constraints: integer, min 1
Response
201 with the queue entry: state `queued`, or `waiting` until approvals and checks pass. 409 for a draft, a closed pull request, or one already queued.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Fields of data
idAlwaysstring
The queue entry idorgIdAlwaysstring
The organization that owns itrepoIdAlwaysstring
The repositoryprIdAlwaysstring
The pull request queuedbaseBranchAlwaysstring
The protected branch the queue merges intostateAlwaysone of waiting, queued, building, passed, failed, merged, removed
waiting (for approvals and checks), queued, building, passed, failed, merged or removedpositionAlwaysnumber
Sort key in the queue: a larger one is further backheadOidAlwaysstring, may be null
Pull request head when it joined the line; null while waitingbaseOidAlwaysstring, may be null
The commit its build sits on; null until builtgroupOidAlwaysstring, may be null
The commit built: the base, every entry ahead, and this one; null until builttempRefAlwaysstring, may be null
The temporary branch built; null until builtmergeMethodAlwaysone of merge, squash, rebase, may be null
How it will be mergedenqueuedByIamUserIdAlwaysstring, may be null
Who added it; null when that IAM user is goneremovalReasonAlwaysstring, may be null
Why it left the queue; null unless removedqueuedAtAlwaysstring, may be null
When it joined the line; null while waitingbuildStartedAtAlwaysstring, may be null
When its build started; null until thenfinishedAtAlwaysstring, may be null
When it merged or left; null while in the queuecreatedAtAlwaysstring
When it was addedupdatedAtAlwaysstring
When it last changed
Checked against the handlers: every route test validates their answers against this schema.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow git:AddToMergeQueue on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud git merge-queue add repoId prNumbercurl -X POST "https://console.platform-development.deutschecloud.app/git/api/repositories/repoId/pulls/prNumber/merge-queue" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY"Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_git_merge-queue_add.