Skip to main content

org_pull_request_creation_caps

Creates, updates, deletes, gets or lists an org_pull_request_creation_caps resource.

Overview

Nameorg_pull_request_creation_caps
TypeResource
Idgithub.interactions.org_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_orgselectorgGets 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_orgupdateorg, enabledUpdates 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.

NameDatatypeDescription
orgstringThe organization name. The name is not case sensitive.

SELECT examples

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

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;