Skip to main content

repo_pull_request_creation_caps

Creates, updates, deletes, gets or lists a repo_pull_request_creation_caps resource.

Overview

Namerepo_pull_request_creation_caps
TypeResource
Idgithub.interactions.repo_pull_request_creation_caps

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
enabledbooleanWhether the pull request creation cap is enabled
max_open_pull_requestsintegerThe maximum number of open pull requests a user can have at one time

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_pull_request_creation_cap_for_reposelectowner, repoGets the pull request creation cap configuration 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 view the cap configuration.
update_pull_request_creation_cap_for_repoupdateowner, repo, enabledUpdates 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

SELECT examples

Gets the pull request creation cap configuration 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 view the cap configuration.

SELECT
enabled,
max_open_pull_requests
FROM github.interactions.repo_pull_request_creation_caps
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
;

UPDATE examples

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.

UPDATE github.interactions.repo_pull_request_creation_caps
SET
enabled = {{ enabled }},
max_open_pull_requests = {{ max_open_pull_requests }}
WHERE
owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND enabled = {{ enabled }} --required
RETURNING
enabled,
max_open_pull_requests;