The API to get issue timeline events is currently available for developers to preview. During the preview period, the APIs may change without advance notice. Please see the blog post for full details.
To access the API you must provide a custom media type in the Accept
header:
application/vnd.github.mockingbird-preview
Timeline
Records various events that occur around an issue or pull request. This is useful both for display on issue and pull request information pages, as well as to determine who should be notified of comments.
Attributes
- id
- The Integer ID of the event.
- url
- The API URL for fetching the event.
- actor
- The User object that generated the event.
- commit_id
- The String SHA of a commit that referenced this Issue.
- event
- Identifies the actual type of Event that occurred.
- created_at
- The timestamp indicating when the event occurred.
- label
- The Label object including `name` and `color` attributes. Only provided for `labeled` and `unlabeled` events.
- assignee
- The User object which was assigned to (or unassigned from) this Issue. Only provided for `assigned` and `unassigned` events.
- milestone
- The Milestone object including a `title` attribute. Only provided for `milestoned` and `demilestoned` events.
- source
- The `id`, `actor`, and `url` for the source of a reference from another issue. Only provided for `cross-referenced` events.
- rename
- An object containing rename details including `from` and `to` attributes. Only provided for `renamed` events.
Events
- assigned
- The issue was assigned to the assignee.
- closed
- The issue was closed by the actor. When the commit_id is present, it identifies the commit that closed the issue using "closes / fixes #NN" syntax.
- commented
- A comment was added to the issue.
- committed
- A commit was added to the pull request's `HEAD` branch. Only provided for pull requests.
- cross-referenced
- The issue was referenced from another issue. The `source` attribute contains the `id`, `actor`, and `url` of the reference's source.
- demilestoned
- The issue was removed from a milestone.
- head_ref_deleted
- The pull request's branch was deleted.
- head_ref_restored
- The pull request's branch was restored.
- labeled
- A label was added to the issue.
- locked
- The issue was locked by the actor.
- mentioned
- The actor was @mentioned in an issue body.
- merged
- The issue was merged by the actor. The `commit_id` attribute is the SHA1 of the HEAD commit that was merged.
- milestoned
- The issue was added to a milestone.
- referenced
- The issue was referenced from a commit message. The `commit_id` attribute is the commit SHA1 of where that happened.
- renamed
- The issue title was changed.
- reopened
- The issue was reopened by the actor.
- review_dismissed
- The actor dismissed a review from the pull request.
- review_requested
- The actor requested review from the subject on this pull request.
- review_request_removed
- The actor removed the review request for the subject on this pull request.
- subscribed
- The actor subscribed to receive notifications for an issue.
- unassigned
- The assignee was unassigned from the issue.
- unlabeled
- A label was removed from the issue.
- unlocked
- The issue was unlocked by the actor.
- unsubscribed
- The actor unsubscribed to stop receiving notifications for an issue.
List events for an issue
GET /repos/:owner/:repo/issues/:issue_number/timeline
Response
Status: 200 OK
Link: <https://api.github.com/resource?page=2>; rel="next",
<https://api.github.com/resource?page=5>; rel="last"
[
{
"id": 1,
"url": "https://api.github.com/repos/octocat/Hello-World/issues/events/1",
"actor": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"event": "closed",
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"commit_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
"created_at": "2011-04-14T16:00:49Z"
}
]