user
Creates, updates, deletes, gets or lists a user resource.
Overview
| Name | user |
| Type | Resource |
| Id | github.interactions.user |
Fields
The following fields are returned by SELECT queries:
- get_restrictions_for_authenticated_user
Default 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_authenticated_user | select | Shows which type of GitHub user can interact with your public repositories and when the restriction expires. | ||
set_restrictions_for_authenticated_user | replace | limit | 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. | |
remove_restrictions_for_authenticated_user | delete | Removes 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.
| Name | Datatype | Description |
|---|
SELECT examples
- get_restrictions_for_authenticated_user
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
- set_restrictions_for_authenticated_user
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
- remove_restrictions_for_authenticated_user
Removes any interaction restrictions from your public repositories.
DELETE FROM github.interactions.user
;