Skip to main content

orgs

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

Overview

Nameorgs
TypeResource
Idgithub.interactions.orgs

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
expires_atstring (date-time) (example: 2018-08-17T04:18:39Z)
limitstringThe 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)
originstring (example: repository)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_restrictions_for_orgselectorgShows 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_orgreplaceorg, limitTemporarily 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_orgdeleteorgRemoves 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.

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

SELECT examples

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

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

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
;