Add a pull request to the merge queue of its base branch
const url = 'https://gitea.com/api/v1/repos/example/example/pulls/1/merge-queue';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"head_commit_id":"example","jump":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gitea.com/api/v1/repos/example/example/pulls/1/merge-queue \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "head_commit_id": "example", "jump": true }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Index of the pull request
Request Body
Section titled “Request Body”Options for adding a pull request to the merge queue
object
Only add the pull request if its head is still this commit
Put the pull request at the front of the queue, even if already queued, requires repository admin
Example generated
{ "head_commit_id": "example", "jump": true}Responses
Section titled “Responses”MergeQueueEntry
Is a pull request waiting in a merge queue
object
Branch the pull request merges into
Represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
The user type
User visibility level option: public, limited, private
The user’s website
Head commit of the pull request when it was added
Whether the pull request jumped to the front of the queue
Ref of the queue commit, empty until it is built
Queue commit testing the pull request, empty until it is built
Position in the queue, starting at 1
Index of the pull request
Queued, awaiting_checks, mergeable or unmergeable
Example
{ "enqueuer": { "type": "User", "visibility": "public" }, "state": "queued"}MergeQueueEntry
Is a pull request waiting in a merge queue
object
Branch the pull request merges into
Represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
The user type
User visibility level option: public, limited, private
The user’s website
Head commit of the pull request when it was added
Whether the pull request jumped to the front of the queue
Ref of the queue commit, empty until it is built
Queue commit testing the pull request, empty until it is built
Position in the queue, starting at 1
Index of the pull request
Queued, awaiting_checks, mergeable or unmergeable
Example
{ "enqueuer": { "type": "User", "visibility": "public" }, "state": "queued"}default
Section titled “default”APIError is error format response
Is an api error with a message
object
Message contains the error description
URL contains the documentation URL for this error
Example generated
{ "message": "example", "url": "https://example.com"}