Skip to content

Update pull request creation cap for a repository

PATCH
/repos/{owner}/{repo}/interaction-limits/pulls/creation-cap

Updates the pull request creation cap for a repository. The cap limits the number of open pull requests a user can have at one time.

Only users with admin access to the repository can configure the cap.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

Media type application/json
object
enabled
required

Whether the pull request creation cap is enabled

boolean
max_open_pull_requests

The maximum number of open pull requests a user can have at one time

integer
>= 1 <= 1000
Examples
Example default

Example request body

{
"enabled": true,
"max_open_pull_requests": 1
}

Response

Media type application/json
object
enabled
required

Whether the pull request creation cap is enabled

boolean
max_open_pull_requests
required

The maximum number of open pull requests a user can have at one time

integer
>= 1 <= 1000
Examples
Example default

Response

{
"enabled": true,
"max_open_pull_requests": 1
}

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Method Not Allowed

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Validation failed, or the endpoint has been spammed.

Media type application/json
Validation Error

Validation Error

object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
nullable
Example generated
{
"message": "example",
"documentation_url": "example",
"errors": [
{
"resource": "example",
"field": "example",
"message": "example",
"code": "example",
"index": 1,
"value": [
"example"
]
}
]
}