Simulator

Simulate Mergify behavior on pull requests and configurations.


Get a Mergify simulation for a pull request

POST /repos/{owner}/{repository}/pulls/{number}/simulator

Get a simulation of what Mergify will do on a pull request

Application Key GitHub Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

repository string required

The name of the repository

min length: 1 · pattern: ^[\w\-\.]+$

number integer required

The pull request number

min: 0

mergify_ymlstringrequired

A Mergify configuration

max length: 1048576
200 Successful Response
titlestringrequired

The title of the Mergify check run simulation

summarystringrequired

The summary of the Mergify check run simulation

Example Response

                          {
  "title": "string",
  "summary": "string"
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X POST "https://api.mergify.com/v1/repos/:owner/:repository/pulls/:number/simulator" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "mergify_yml": "string"
}'

Get a Mergify simulation for a repository

POST /repos/{owner}/{repository}/simulator

Get a simulation of what Mergify will do for this repository

Application Key GitHub Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

repository string required

The name of the repository

min length: 1 · pattern: ^[\w\-\.]+$

mergify_ymlstringrequired

A Mergify configuration

max length: 1048576
200 Successful Response
titlestringrequired

The title of the Mergify check run simulation

summarystringrequired

The summary of the Mergify check run simulation

Example Response

                          {
  "title": "string",
  "summary": "string"
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X POST "https://api.mergify.com/v1/repos/:owner/:repository/simulator" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "mergify_yml": "string"
}'

Get a Mergify configuration simulation for a repository

POST /repos/{owner}/{repository}/configuration-simulator

Get a simulation of what Mergify will do for this repository

Application Key GitHub Token
owner string required

The owner of the repository

min length: 1 · max length: 40 · pattern: ^[a-zA-Z0-9\-]+$

repository string required

The name of the repository

min length: 1 · pattern: ^[\w\-\.]+$

mergify_ymlstringrequired

A Mergify configuration

max length: 1048576
200 Successful Response
messagestringrequired

The message of the Mergify check run simulation

Example Response

                          {
  "message": "The configuration is valid"
}
                        
403 Forbidden
404 Not found
409 Conflict
422 Unprocessable entity
Example Request
curl -X POST "https://api.mergify.com/v1/repos/:owner/:repository/configuration-simulator" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "mergify_yml": "string"
}'

Was this page helpful?