repo_pull_request_creation_caps
Creates, updates, deletes, gets or lists a repo_pull_request_creation_caps resource.
Overview
| Name | repo_pull_request_creation_caps |
| Type | Resource |
| Id | github.interactions.repo_pull_request_creation_caps |
Fields
The following fields are returned by SELECT queries:
- get_pull_request_creation_cap_for_repo
Response
| Name | Datatype | Description |
|---|---|---|
enabled | boolean | Whether the pull request creation cap is enabled |
max_open_pull_requests | integer | The maximum number of open pull requests a user can have at one time |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_pull_request_creation_cap_for_repo | select | owner, repo | 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. | |
update_pull_request_creation_cap_for_repo | update | owner, repo, enabled | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
SELECT examples
- get_pull_request_creation_cap_for_repo
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
- update_pull_request_creation_cap_for_repo
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;