Issue events are triggered by activity in issues and pull requests and are available in the REST API for Issue events and Timeline events. Each event type specifies whether the event is available in the REST API for issue events or timeline events.
GitHub's REST API considers every pull request to be an issue, but not every issue is a pull request. For this reason, the Issue Events and Timeline Events endpoints may return both issues and pull requests in the response. Pull requests have a pull_request property in the issue object. Because pull requests are issues, issue and pull request numbers do not overlap in a repository. For example, if you open your first issue in a repository, the number will be 1. If you then open a pull request, the number will be 2. Each event type specifies if the event occurs in pull request, issues, or both.
Issue event object common properties
Issue events all have the same object structure, except events that are only available in the REST API for timeline events. Some events also include additional properties that provide more context about the event resources. Refer to the specific event for details about any properties that differ from this object format.
| Name | Type | Description |
|---|---|---|
id | integer | The unique identifier of the event. |
node_id | string | The Global Node ID of the event. |
url | string | The REST API URL for fetching the event. |
actor | object | The person who generated the event. |
event | string | Identifies the actual type of event that occurred. |
commit_id | string | The SHA of the commit that referenced this issue. |
commit_url | string | The GitHub REST API link to the commit that referenced this issue. |
created_at | string | The timestamp indicating when the event occurred. |
added_to_project
The issue or pull request was added to a project board. You only see this event in responses when project boards have been enabled in the repository.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Issues | ||
| Pull requests |
Properties for added_to_project
Note: Project card details are now shown in REST API responses for project-related issue and timeline events. This feature is now available for developers to preview. For details, see the blog post.
To receive the project_card attribute, project boards must be enabled for a repository, and you must provide a custom media type in the Accept header:
application/vnd.github.starfox-preview+json
Warning: The API may change without advance notice during the preview period. Preview features are not supported for production use. If you experience any issues, contact your site administrator.
| Name | Type | Description |
|---|---|---|
id | integer | The unique identifier of the event. |
node_id | string | The Global Node ID of the event. |
url | string | The REST API URL for fetching the event. |
actor | object | The person who generated the event. |
event | string | Identifies the actual type of event that occurred. |
commit_id | string | The SHA of the commit that referenced this issue. |
commit_url | string | The GitHub REST API link to the commit that referenced this issue. |
created_at | string | The timestamp indicating when the event occurred. |
project_card | object | The project card object. |
project_id | integer | The unique identifier of the project card. |
project_url | string | The REST API URL to retrieve the project card. |
column_name | string | The name of the column the issue is in. |
assigned
The issue or pull request was assigned to a user.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Issues | ||
| Pull requests |
Properties for assigned
| Name | Type | Description |
|---|---|---|
id | integer | The unique identifier of the event. |
node_id | string | The Global Node ID of the event. |
url | string | The REST API URL for fetching the event. |
actor | object | The person who generated the event. |
event | string | Identifies the actual type of event that occurred. |
commit_id | string | The SHA of the commit that referenced this issue. |
commit_url | string | The GitHub REST API link to the commit that referenced this issue. |
created_at | string | The timestamp indicating when the event occurred. |
assignee | object | The person unassigned from this issue. |
assigner | object | The person who performed the unassignment for this issue. This field is available in the REST API for issue events but not the REST API for timeline events. |
automatic_base_change_failed
GitHub unsuccessfully attempted to automatically change the base branch of the pull request.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Pull requests |
Properties for automatic_base_change_failed
| Name | Type | Description |
|---|---|---|
id | integer | The unique identifier of the event. |
node_id | string | The Global Node ID of the event. |
url | string | The REST API URL for fetching the event. |
actor | object | The person who generated the event. |
event | string | Identifies the actual type of event that occurred. |
commit_id | string | The SHA of the commit that referenced this issue. |
commit_url | string | The GitHub REST API link to the commit that referenced this issue. |
created_at | string | The timestamp indicating when the event occurred. |
automatic_base_change_succeeded
GitHub successfully attempted to automatically change the base branch of the pull request.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Pull requests |
Properties for automatic_base_change_succeeded
| Name | Type | Description |
|---|---|---|
id | integer | The unique identifier of the event. |
node_id | string | The Global Node ID of the event. |
url | string | The REST API URL for fetching the event. |
actor | object | The person who generated the event. |
event | string | Identifies the actual type of event that occurred. |
commit_id | string | The SHA of the commit that referenced this issue. |
commit_url | string | The GitHub REST API link to the commit that referenced this issue. |
created_at | string | The timestamp indicating when the event occurred. |
base_ref_changed
The base reference branch of the pull request changed.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Pull requests |
Properties for base_ref_changed
| Name | Type | Description |
|---|---|---|
id | integer | The unique identifier of the event. |
node_id | string | The Global Node ID of the event. |
url | string | The REST API URL for fetching the event. |
actor | object | The person who generated the event. |
event | string | Identifies the actual type of event that occurred. |
commit_id | string | The SHA of the commit that referenced this issue. |
commit_url | string | The GitHub REST API link to the commit that referenced this issue. |
created_at | string | The timestamp indicating when the event occurred. |
closed
The issue or pull request was closed. When the commit_id is present, it identifies the commit that closed the issue using "closes / fixes" syntax. For more information about the syntax, see "Linking a pull request to an issue".
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Issues | ||
| Pull requests |
Properties for closed
| Name | Type | Description |
|---|---|---|
id | integer | The unique identifier of the event. |
node_id | string | The Global Node ID of the event. |
url | string | The REST API URL for fetching the event. |
actor | object | The person who generated the event. |
event | string | Identifies the actual type of event that occurred. |
commit_id | string | The SHA of the commit that referenced this issue. |
commit_url | string | The GitHub REST API link to the commit that referenced this issue. |
created_at | string | The timestamp indicating when the event occurred. |
commented
A comment was added to the issue or pull request.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Issues | ||
| Pull requests |
Properties for commented
This events properties do not use the same structure as the issue event object common properties. The following properties are returned for this event.