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

Update pull request creation cap for a repository

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.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 3 body fields
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
enabledbooleanrequired
Whether the pull request creation cap is enabled
max_open_pull_requestsintegeroptional
The maximum number of open pull requests a user can have at one time
include_draftsbooleanoptional
Whether draft pull requests count toward the pull request creation cap

5 status codes
200Response
enabledbooleanrequired
Whether the pull request creation cap is enabled
max_open_pull_requestsintegerrequired
The maximum number of open pull requests a user can have at one time
include_draftsbooleanoptional
Whether draft pull requests count toward the pull request creation cap
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
405Method Not Allowed
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional

Error handling

A 403 is returned: Forbidden. A 404 is returned: Resource not found. A 405 is returned: Method Not Allowed. A 422 is returned: Validation failed, or the endpoint has been spammed.