Skip to main content

user

Creates, updates, deletes, gets or lists a user resource.

Overview​

Nameuser
TypeResource
Idgithub.interactions.user

Fields​

The following fields are returned by SELECT queries:

Default 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_authenticated_userselectShows which type of GitHub user can interact with your public repositories and when the restriction expires.
set_restrictions_for_authenticated_userreplacelimitTemporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user.
remove_restrictions_for_authenticated_userdeleteRemoves any interaction restrictions from your public repositories.

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

SELECT examples​

Shows which type of GitHub user can interact with your public repositories and when the restriction expires.

SELECT
expires_at,
limit,
origin
FROM github.interactions.user
;

REPLACE examples​

Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user.

REPLACE github.interactions.user
SET
limit = '{{ limit }}',
expiry = '{{ expiry }}'
WHERE
limit = '{{ limit }}' --required
RETURNING
expires_at,
limit,
origin;

DELETE examples​

Removes any interaction restrictions from your public repositories.

DELETE FROM github.interactions.user
;