orgs
Creates, updates, deletes, gets or lists an orgs resource.
Overview
| Name | orgs |
| Type | Resource |
| Id | github.interactions.orgs |
Fields
The following fields are returned by SELECT queries:
- get_restrictions_for_org
Response
| Name | Datatype | Description |
|---|---|---|
expires_at | string (date-time) | (example: 2018-08-17T04:18:39Z) |
limit | string | The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. (existing_users, contributors_only, collaborators_only) (example: collaborators_only) |
origin | string | (example: repository) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_restrictions_for_org | select | org | Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. | |
set_restrictions_for_org | replace | org, limit | Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. | |
remove_restrictions_for_org | delete | org | Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. |
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_restrictions_for_org
Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response.
SELECT
expires_at,
limit,
origin
FROM github.interactions.orgs
WHERE org = '{{ org }}' -- required
;
REPLACE examples
- set_restrictions_for_org
Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization.
REPLACE github.interactions.orgs
SET
limit = '{{ limit }}',
expiry = '{{ expiry }}'
WHERE
org = '{{ org }}' --required
AND limit = '{{ limit }}' --required
RETURNING
expires_at,
limit,
origin;
DELETE examples
- remove_restrictions_for_org
Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.
DELETE FROM github.interactions.orgs
WHERE org = '{{ org }}' --required
;