assignees
Creates, updates, deletes, gets or lists an assignees resource.
Overview
| Name | assignees |
| Type | Resource |
| Id | github.issues.assignees |
Fields
The following fields are returned by SELECT queries:
- list_assignees
Response
| Name | Datatype | Description |
|---|---|---|
id | integer (int64) | |
name | string | |
gravatar_id | string | (example: 41d064eb2195891e12d0413f63227ea7) |
node_id | string | (example: MDQ6VXNlcjE=) |
avatar_url | string (uri) | (example: https://github.com/images/error/octocat_happy.gif) |
email | string | |
events_url | string | (example: https://api.github.com/users/octocat/events{/privacy}) |
followers_url | string (uri) | (example: https://api.github.com/users/octocat/followers) |
following_url | string | (example: https://api.github.com/users/octocat/following{/other_user}) |
gists_url | string | (example: https://api.github.com/users/octocat/gists{/gist_id}) |
html_url | string (uri) | (example: https://github.com/octocat) |
login | string | (example: octocat) |
organizations_url | string (uri) | (example: https://api.github.com/users/octocat/orgs) |
received_events_url | string (uri) | (example: https://api.github.com/users/octocat/received_events) |
repos_url | string (uri) | (example: https://api.github.com/users/octocat/repos) |
site_admin | boolean | |
starred_at | string | (example: "2020-07-09T00:17:55Z") |
starred_url | string | (example: https://api.github.com/users/octocat/starred{/owner}{/repo}) |
subscriptions_url | string (uri) | (example: https://api.github.com/users/octocat/subscriptions) |
type | string | (example: User) |
url | string (uri) | (example: https://api.github.com/users/octocat) |
user_view_type | string | (example: public) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_assignees | select | owner, repo | per_page, page | Lists the available assignees for issues in a repository. |
add_assignees | insert | owner, repo, issue_number | Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. | |
remove_assignees | delete | owner, repo, issue_number | Removes one or more assignees from an issue. | |
check_user_can_be_assigned | exec | owner, repo, assignee | Checks if a user has permission to be assigned to an issue in this repository. If the assignee can be assigned to issues in the repository, a 204 header with no content is returned.Otherwise a 404 status code is returned. | |
check_user_can_be_assigned_to_issue | exec | owner, repo, issue_number, assignee | Checks if a user has permission to be assigned to a specific issue. If the assignee can be assigned to this issue, a 204 status code with no content is returned.Otherwise a 404 status code is returned. |
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 |
|---|---|---|
assignee | string | |
issue_number | integer | The number that identifies the issue. |
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
page | integer | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- list_assignees
Lists the available assignees for issues in a repository.
SELECT
id,
name,
gravatar_id,
node_id,
avatar_url,
email,
events_url,
followers_url,
following_url,
gists_url,
html_url,
login,
organizations_url,
received_events_url,
repos_url,
site_admin,
starred_at,
starred_url,
subscriptions_url,
type,
url,
user_view_type
FROM github.issues.assignees
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
INSERT examples
- add_assignees
- Manifest
Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.
INSERT INTO github.issues.assignees (
assignees,
owner,
repo,
issue_number
)
SELECT
'{{ assignees }}',
'{{ owner }}',
'{{ repo }}',
'{{ issue_number }}'
RETURNING
id,
node_id,
active_lock_reason,
assignee,
assignees,
author_association,
body,
body_html,
body_text,
closed_at,
closed_by,
comments,
comments_url,
created_at,
draft,
events_url,
html_url,
issue_dependencies_summary,
issue_field_values,
labels,
labels_url,
locked,
milestone,
number,
parent_issue_url,
performed_via_github_app,
pinned_comment,
pull_request,
reactions,
repository,
repository_url,
state,
state_reason,
sub_issues_summary,
timeline_url,
title,
type,
updated_at,
url,
user
;
# Description fields are for documentation purposes
- name: assignees
props:
- name: owner
value: "{{ owner }}"
description: Required parameter for the assignees resource.
- name: repo
value: "{{ repo }}"
description: Required parameter for the assignees resource.
- name: issue_number
value: {{ issue_number }}
description: Required parameter for the assignees resource.
- name: assignees
value:
- "{{ assignees }}"
description: |
Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._
DELETE examples
- remove_assignees
Removes one or more assignees from an issue.
DELETE FROM github.issues.assignees
WHERE owner = '{{ owner }}' --required
AND repo = '{{ repo }}' --required
AND issue_number = '{{ issue_number }}' --required
;
Lifecycle Methods
- check_user_can_be_assigned
- check_user_can_be_assigned_to_issue
Checks if a user has permission to be assigned to an issue in this repository.
If the assignee can be assigned to issues in the repository, a 204 header with no content is returned.
Otherwise a 404 status code is returned.
EXEC github.issues.assignees.check_user_can_be_assigned
@owner='{{ owner }}' --required,
@repo='{{ repo }}' --required,
@assignee='{{ assignee }}' --required
;
Checks if a user has permission to be assigned to a specific issue.
If the assignee can be assigned to this issue, a 204 status code with no content is returned.
Otherwise a 404 status code is returned.
EXEC github.issues.assignees.check_user_can_be_assigned_to_issue
@owner='{{ owner }}' --required,
@repo='{{ repo }}' --required,
@issue_number='{{ issue_number }}' --required,
@assignee='{{ assignee }}' --required
;