Mergify Dequeue Command
Remove a pull request from a merge queue.
The dequeue command removes a pull request from the merge queue. This
command is ideal for situations where you realize a pull request either
shouldn’t be merged or needs further revision before merging.
Syntax
Section titled Syntax@Mergifyio dequeueWhat it cancels
Section titled What it cancelsA queue command leaves a pull request in one of two states,
and dequeue covers both:
-
In the queue. Mergify takes the pull request out and reports that it has been removed from the queue.
-
Waiting to enter it. A
queuecommand stays pending until the pull request matches a queue’squeue_conditions.dequeuecancels that pending command, so the pull request is not queued later when the conditions eventually match.
When neither applies, Mergify answers that the pull request is not queued and does nothing else.
A dequeued pull request never rejoins the queue on its own. Run
@mergifyio queue again once it’s ready, as described in
Requeuing a pull request in the merge
queue.
Dequeuing a pull request that others are stacked on top of also removes the ones above it that are still in the queue. See cascade dequeue.
Dequeuing through the API
Section titled Dequeuing through the APIThe Mergify API dequeues a pull request without a comment:
curl -X POST \ -H "Authorization: Bearer <token>" \ https://api.mergify.com/v1/repos/<owner>/<repository>/merge-queue/pull/<number>/dequeueIt covers the same two states as the command: it takes the pull request out of
the queue, or cancels a queue request still waiting for queue_conditions,
including one made through the API.
Mergify answers 204 No Content.
The call needs the same credentials as
queueing, and the command
restrictions set for dequeue apply to it. When
Mergify refuses the request, the response body carries an error_code:
| Status | error_code |
Meaning |
|---|---|---|
403 |
COMMAND_RESTRICTED |
Your commands_restrictions don’t let the caller dequeue this pull request. |
404 |
PULL_REQUEST_NOT_QUEUED |
The pull request is neither in the queue nor waiting to enter it. |
422 |
CONFIGURATION_INVALID |
The repository’s Mergify configuration is invalid. |
The request is recorded as a command.dequeue event, with the fields described
in the event log.
Was this page helpful?
Thanks for your feedback!