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. |
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 assigned to this issue. |
assigner | object | The person who performed the assignment 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.
| Name | Type | Description |
|---|---|---|
url | string | The REST API URL to retrieve the issue comment. |
html_url | string | The HTML URL of the issue comment. |
issue_url | string | The HTML URL of the issue. |
id | integer | The unique identifier of the event. |
node_id | string | The Global Node ID of the event. |
user | object | The person who commented on the issue. |
created_at | string | The timestamp indicating when the comment was added. |
updated_at | string | The timestamp indicating when the comment was updated or created, if the comment is never updated. |
author_association | string | The permissions the user has in the issue's repository. For example, the value would be "OWNER" if the owner of repository created a comment. |
body | string | The comment body text. |
event | string | The event value is "commented". |
actor | object | The person who generated the event. |
committed
A commit was added to the pull request's HEAD branch.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Pull requests |
Properties for committed
This events properties do not use the same structure as the issue event object common properties. The following properties are returned for this event.
| Name | Type | Description |
|---|---|---|
sha | string | The SHA of the commit in the pull request. |
node_id | string | The Global Node ID of the event. |
url | string | The REST API URL to retrieve the commit. |
html_url | string | The HTML URL of the commit. |
author | object | The person who authored the commit. |
committer | object | The person who committed the commit on behalf of the author. |
tree | object | The Git tree of the commit. |
message | string | The commit message. |
parents | array of objects | A list of parent commits. |
verification | object | The result of verifying the commit's signature. For more information, see REST API endpoints for Git commits. |
event | string | The event value is "committed". |
connected
The issue or pull request was linked to another issue or pull request. For more information, 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 connected
| 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. |
convert_to_draft
The pull request was converted to draft mode.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Pull requests |
Properties for convert_to_draft
| 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. |
converted_to_discussion
The issue was closed and converted to a discussion.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Issues |
Properties for converted_to_discussion
| 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. |
cross-referenced
The issue or pull request was referenced from another 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 cross-referenced
This events properties do not use the same structure as the issue event object common properties. The following properties are returned for this event.
| Name | Type | Description |
|---|---|---|
actor | object | The person who generated the event. |
created_at | string | The timestamp indicating when the cross-reference was added. |
updated_at | string | The timestamp indicating when the cross-reference was updated or created, if the cross-reference is never updated. |
source | object | The issue or pull request that added a cross-reference. |
source[type] | string | This value will always be "issue" because pull requests are of type issue. Only cross-reference events triggered by issues or pull requests are returned in the REST API for timeline events. To determine if the issue that triggered the event is a pull request, you can check if the source[issue][pull_request] object exists. |
source[issue] | object | The issue object that added the cross-reference. |
event | string | The event value is "cross-referenced". |
demilestoned
The issue or pull request was removed from a milestone.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Issues | ||
| Pull requests |
Properties for demilestoned
| 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. |
milestone | object | The milestone object. |
milestone[title] | string | The title of the milestone. |
deployed
The pull request was deployed.
This event is available for the following issue types.
| REST API for issue events | REST API for timeline events | |
|---|---|---|
| Pull requests |
Properties for deployed
| Name | Type | Description |
|---|---|---|
id | integer | The unique identifier of the event. |
node_id | string | The Global Node ID of the event. |