org_pull_request_creation_caps
Creates, updates, deletes, gets or lists an org_pull_request_creation_caps resource.
Overview
| Name | org_pull_request_creation_caps |
| Type | Resource |
| Id | github.interactions.org_pull_request_creation_caps |
Fields
The following fields are returned by SELECT queries:
- get_pull_request_creation_cap_for_org
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_org | select | org | Gets the pull request creation cap configuration for an organization. The cap limits the total number of open pull requests a user can have across all public repositories in the organization at one time. Only users with admin access to the organization can view the cap configuration. | |
update_pull_request_creation_cap_for_org | update | org, enabled | Updates the pull request creation cap for an organization. The cap limits the total number of open pull requests a user can have across all public repositories in the organization at one time. Only users with admin access to the organization 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 |
|---|---|---|
org | string | The organization name. The name is not case sensitive. |
SELECT examples
- get_pull_request_creation_cap_for_org
Gets the pull request creation cap configuration for an organization.
The cap limits the total number of open pull requests a user can have across all public
repositories in the organization at one time.
Only users with admin access to the organization can view the cap configuration.
SELECT
enabled,
max_open_pull_requests
FROM github.interactions.org_pull_request_creation_caps
WHERE org = '{{ org }}' -- required
;
UPDATE examples
- update_pull_request_creation_cap_for_org
Updates the pull request creation cap for an organization. The cap limits the total number
of open pull requests a user can have across all public repositories in the organization
at one time.
Only users with admin access to the organization can configure the cap.
UPDATE github.interactions.org_pull_request_creation_caps
SET
enabled = {{ enabled }},
max_open_pull_requests = {{ max_open_pull_requests }}
WHERE
org = '{{ org }}' --required
AND enabled = {{ enabled }} --required
RETURNING
enabled,
max_open_pull_requests;