events
Creates, updates, deletes, gets or lists an events resource.
Overview
| Name | events |
| Type | Resource |
| Id | github.issues.events |
Fields
The following fields are returned by SELECT queries:
- get_event
- list_events
- list_events_for_repo
Response
| Name | Datatype | Description |
|---|---|---|
id | integer (int64) | |
commit_id | string | (example: 6dcb09b5b57875f334f61aebed695e2e4193db5e) |
node_id | string | (example: MDEwOklzc3VlRXZlbnQx) |
actor | object | A GitHub user. (title: Simple User) |
assignee | object | A GitHub user. (title: Simple User) |
assigner | object | A GitHub user. (title: Simple User) |
author_association | string | How the author is associated with the repository. (COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER) (title: author_association, example: OWNER) |
commit_url | string | (example: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e) |
created_at | string (date-time) | (example: 2011-04-14T16:00:49Z) |
dismissed_review | object | (title: Issue Event Dismissed Review) |
event | string | (example: closed) |
issue | object | Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. (title: Issue) |
label | object | Issue Event Label (title: Issue Event Label) |
lock_reason | string | |
milestone | object | Issue Event Milestone (title: Issue Event Milestone) |
performed_via_github_app | object | GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. (title: GitHub app) |
project_card | object | Issue Event Project Card (title: Issue Event Project Card) |
rename | object | Issue Event Rename (title: Issue Event Rename) |
requested_reviewer | object | A GitHub user. (title: Simple User) |
requested_team | object | Groups of organization members that gives permissions on specified repositories. (title: Team) |
review_requester | object | A GitHub user. (title: Simple User) |
url | string (uri) | (example: https://api.github.com/repos/octocat/Hello-World/issues/events/1) |
Response
| Name | Datatype | Description |
|---|---|---|
id | integer | |
commit_id | string | |
node_id | string | |
actor | object | A GitHub user. (title: Simple User) |
assignee | object | A GitHub user. (title: Simple User) |
assigner | object | A GitHub user. (title: Simple User) |
commit_url | string | |
created_at | string | |
dismissed_review | object | |
event | string | |
label | object | |
lock_reason | string | (example: "off-topic") |
milestone | object | |
performed_via_github_app | object | GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. (title: GitHub app) |
project_card | object | |
rename | object | |
requested_reviewer | object | A GitHub user. (title: Simple User) |
requested_team | object | Groups of organization members that gives permissions on specified repositories. (title: Team) |
review_requester | object | A GitHub user. (title: Simple User) |
url | string |
Response
| Name | Datatype | Description |
|---|---|---|
id | integer (int64) | |
commit_id | string | (example: 6dcb09b5b57875f334f61aebed695e2e4193db5e) |
node_id | string | (example: MDEwOklzc3VlRXZlbnQx) |
actor | object | A GitHub user. (title: Simple User) |
assignee | object | A GitHub user. (title: Simple User) |
assigner | object | A GitHub user. (title: Simple User) |
author_association | string | How the author is associated with the repository. (COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER) (title: author_association, example: OWNER) |
commit_url | string | (example: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e) |
created_at | string (date-time) | (example: 2011-04-14T16:00:49Z) |
dismissed_review | object | (title: Issue Event Dismissed Review) |
event | string | (example: closed) |
issue | object | Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. (title: Issue) |
label | object | Issue Event Label (title: Issue Event Label) |
lock_reason | string | |
milestone | object | Issue Event Milestone (title: Issue Event Milestone) |
performed_via_github_app | object | GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. (title: GitHub app) |
project_card | object | Issue Event Project Card (title: Issue Event Project Card) |
rename | object | Issue Event Rename (title: Issue Event Rename) |
requested_reviewer | object | A GitHub user. (title: Simple User) |
requested_team | object | Groups of organization members that gives permissions on specified repositories. (title: Team) |
review_requester | object | A GitHub user. (title: Simple User) |
url | string (uri) | (example: https://api.github.com/repos/octocat/Hello-World/issues/events/1) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_event | select | owner, repo, event_id | Gets a single event by the event id. | |
list_events | select | owner, repo, issue_number | per_page, page | Lists all events for an issue. |
list_events_for_repo | select | owner, repo | per_page, page | Lists events for a repository. |
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 |
|---|---|---|
event_id | integer | |
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
- get_event
- list_events
- list_events_for_repo
Gets a single event by the event id.
SELECT
id,
commit_id,
node_id,
actor,
assignee,
assigner,
author_association,
commit_url,
created_at,
dismissed_review,
event,
issue,
label,
lock_reason,
milestone,
performed_via_github_app,
project_card,
rename,
requested_reviewer,
requested_team,
review_requester,
url
FROM github.issues.events
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND event_id = '{{ event_id }}' -- required
;
Lists all events for an issue.
SELECT
id,
commit_id,
node_id,
actor,
assignee,
assigner,
commit_url,
created_at,
dismissed_review,
event,
label,
lock_reason,
milestone,
performed_via_github_app,
project_card,
rename,
requested_reviewer,
requested_team,
review_requester,
url
FROM github.issues.events
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND issue_number = '{{ issue_number }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;
Lists events for a repository.
SELECT
id,
commit_id,
node_id,
actor,
assignee,
assigner,
author_association,
commit_url,
created_at,
dismissed_review,
event,
issue,
label,
lock_reason,
milestone,
performed_via_github_app,
project_card,
rename,
requested_reviewer,
requested_team,
review_requester,
url
FROM github.issues.events
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND per_page = '{{ per_page }}'
AND page = '{{ page }}'
;