Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit ed233e9

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent 62ea15b commit ed233e9

File tree

4 files changed

+168
-8
lines changed

4 files changed

+168
-8
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: Preview the Timeline API
3+
author_name: nickh
4+
---
5+
6+
We've added an API for issue timelines, which will let you fetch a list
7+
of events from an issue or pull request timeline.
8+
9+
To access [the Timeline API][docs] during the preview period, you must provide a custom [media type][media-type] in the `Accept` header:
10+
11+
application/vnd.github.mockingbird-preview
12+
13+
During the preview period, we may change aspects of these API methods based on developer feedback. If we do, we will announce the changes here on the developer blog, but we will not provide any advance notice.
14+
15+
If you have any questions or feedback, please [let us know][contact]!
16+
17+
[media-type]: /v3/media
18+
[docs]: /v3/issues/timeline/
19+
[contact]: https://github.com/contact?form%5Bsubject%5D=Timeline+API

content/v3/issues/events.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: Issue Events
66

77
{:toc}
88

9-
Records various events that occur around an Issue or Pull Request. This is
9+
Records various events that occur around an issue or pull request. This is
1010
useful both for display on issue/pull request information pages and also to
1111
determine who should be notified of comments.
1212

@@ -20,7 +20,7 @@ determine who should be notified of comments.
2020
<dd>The API URL for fetching the event.</dd>
2121

2222
<dt>actor</dt>
23-
<dd>Always the User object that generated the event.</dd>
23+
<dd>The User object that generated the event.</dd>
2424

2525
<dt>commit_id</dt>
2626
<dd>The String SHA of a commit that referenced this Issue</dd>
@@ -35,8 +35,8 @@ determine who should be notified of comments.
3535
<dd>The timestamp indicating when the event occurred.</dd>
3636

3737
<dt>label</dt>
38-
<dd>The Label object including 'name' and 'color' attributes. Only provided for 'labeled'
39-
and 'unlabeled' events.</dd>
38+
<dd>The Label object including `name` and `color` attributes. Only provided for `labeled`
39+
and `unlabeled` events.</dd>
4040

4141
<dt>assignee</dt>
4242
<dd>The User object which was assigned to (or unassigned from) this Issue. Only provided for 'assigned' and 'unassigned' events.</dd>
@@ -47,12 +47,12 @@ determine who should be notified of comments.
4747
{% endif %}
4848

4949
<dt>milestone</dt>
50-
<dd>The Milestone object including a 'title' attribute. Only provided for 'milestoned' and
51-
'demilestoned' events.</dd>
50+
<dd>The Milestone object including a `title` attribute. Only provided for `milestoned` and
51+
`demilestoned` events.</dd>
5252

5353
<dt>rename</dt>
54-
<dd>An object containing rename details including 'from' and 'to' attributes. Only
55-
provided for 'renamed' events.</dd>
54+
<dd>An object containing rename details including `from` and `to` attributes. Only
55+
provided for `renamed` events.</dd>
5656
</dl>
5757

5858
### Events

content/v3/issues/timeline.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
title: Issue Timeline
3+
---
4+
5+
# Timeline
6+
7+
{:toc}
8+
9+
Records various events that occur around an issue or pull request. This is
10+
useful both for display on issue and pull request information pages, as well as to
11+
determine who should be notified of comments.
12+
13+
### Attributes
14+
15+
<dl>
16+
<dt>id</dt>
17+
<dd>The Integer ID of the event.</dd>
18+
19+
<dt>url</dt>
20+
<dd>The API URL for fetching the event.</dd>
21+
22+
<dt>actor</dt>
23+
<dd>The User object that generated the event.</dd>
24+
25+
<dt>commit_id</dt>
26+
<dd>The String SHA of a commit that referenced this Issue.</dd>
27+
28+
<dt>event</dt>
29+
<dd>Identifies the actual type of Event that occurred.</dd>
30+
31+
<dt>created_at</dt>
32+
<dd>The timestamp indicating when the event occurred.</dd>
33+
34+
<dt>label</dt>
35+
<dd>The Label object including `name` and `color` attributes. Only provided for `labeled`
36+
and `unlabeled` events.</dd>
37+
38+
<dt>assignee</dt>
39+
<dd>The User object which was assigned to (or unassigned from) this Issue. Only provided for `assigned` and `unassigned` events.</dd>
40+
41+
<dt>assigner</dt>
42+
<dd>The User object that performed the assignment (or unassignment) for this Issue. Only provided for `assigned` and `unassigned` events.</dd>
43+
44+
<dt>milestone</dt>
45+
<dd>The Milestone object including a `title` attribute. Only provided for `milestoned` and
46+
`demilestoned` events.</dd>
47+
48+
<dt>source</dt>
49+
<dd>The `id`, `actor`, and `url` for the source of a reference from
50+
another issue. Only provided for `cross-referenced` events.</dd>
51+
52+
<dt>rename</dt>
53+
<dd>An object containing rename details including `from` and `to` attributes. Only
54+
provided for `renamed` events.</dd>
55+
</dl>
56+
57+
### Events
58+
59+
<dl>
60+
<dt>assigned</dt>
61+
<dd>The issue was assigned to the actor.</dd>
62+
63+
<dt>closed</dt>
64+
<dd>The issue was closed by the actor. When the commit_id is present, it
65+
identifies the commit that closed the issue using "closes / fixes #NN"
66+
syntax.</dd>
67+
68+
<dt>commented</dt>
69+
<dd>A comment was added to the issue.</dd>
70+
71+
<dt>committed</dt>
72+
<dd>A commit was added to the pull request's `HEAD` branch. Only
73+
provided for pull requests.</dd>
74+
75+
<dt>cross-referenced</dt>
76+
<dd>The issue was referenced from another issue. The `source`
77+
attribute contains the `id`, `actor`, and `url` of the reference's
78+
source.</dd>
79+
80+
<dt>demilestoned</dt>
81+
<dd>The issue was removed from a milestone.</dd>
82+
83+
<dt>head_ref_deleted</dt>
84+
<dd>The pull request's branch was deleted.</dd>
85+
86+
<dt>head_ref_restored</dt>
87+
<dd>The pull request's branch was restored.</dd>
88+
89+
<dt>labeled</dt>
90+
<dd>A label was added to the issue.</dd>
91+
92+
<dt>locked</dt>
93+
<dd>The issue was locked by the actor.</dd>
94+
95+
<dt>mentioned</dt>
96+
<dd>The actor was @mentioned in an issue body.</dd>
97+
98+
<dt>merged</dt>
99+
<dd>The issue was merged by the actor. The `commit_id` attribute is the SHA1 of
100+
the HEAD commit that was merged.</dd>
101+
102+
<dt>milestoned</dt>
103+
<dd>The issue was added to a milestone.</dd>
104+
105+
<dt>referenced</dt>
106+
<dd>The issue was referenced from a commit message. The `commit_id` attribute is
107+
the commit SHA1 of where that happened.</dd>
108+
109+
<dt>renamed</dt>
110+
<dd>The issue title was changed.</dd>
111+
112+
<dt>reopened</dt>
113+
<dd>The issue was reopened by the actor.</dd>
114+
115+
<dt>subscribed</dt>
116+
<dd>The actor subscribed to receive notifications for an issue.</dd>
117+
118+
<dt>unassigned</dt>
119+
<dd>The actor was unassigned from the issue.</dd>
120+
121+
<dt>unlabeled</dt>
122+
<dd>A label was removed from the issue.</dd>
123+
124+
<dt>unlocked</dt>
125+
<dd>The issue was unlocked by the actor.</dd>
126+
127+
<dt>unsubscribed</dt>
128+
<dd>The actor unsubscribed to stop receiving notifications for an issue.</dd>
129+
</dl>
130+
131+
## List events for an issue
132+
133+
GET /repos/:owner/:repo/issues/:issue_number/timeline
134+
135+
### Response
136+
137+
<%= headers 200, :pagination => default_pagination_rels %>
138+
<%= json(:issue_event) { |h| [h] } %>

layouts/sidebar.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ <h3><a href="#" class="js-expand-btn collapsed arrow-btn" data-proofer-ignore></
4747
<li><a href="/v3/issues/events/">Events</a></li>
4848
<li><a href="/v3/issues/labels/">Labels</a></li>
4949
<li><a href="/v3/issues/milestones/">Milestones</a></li>
50+
<% if !@item[:version].nil? && (@item[:version] == 'dotcom' || @item[:version] > 2.6) %>
51+
<li><a href="/v3/issues/timeline/">Timeline</a></li>
52+
<% end %>
5053
</ul>
5154
</li>
5255
<% if @item[:version] == 'dotcom' %>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy