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

Commit b0c9870

Browse files
committed
Merge pull request #1004 from github/update-1455228315
2 parents 63cffc4 + 0a8e676 commit b0c9870

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
kind: change
3+
title: Issue Locking and Unlocking API Preview Period
4+
created_at: 2016-02-11
5+
author_name: davidcelis
6+
---
7+
8+
We're introducing new API methods to allow repository collaborators to [lock and unlock conversations][lock-an-issue]. Developers with [collaborator permissions][permissions] on a repository can start experimenting with these new endpoints today during the preview period.
9+
10+
To lock a conversation, make a `PUT` request to the conversation's issue:
11+
12+
``` command-line
13+
$ curl "https://api.github.com/repos/github/hubot/issues/1/lock" \
14+
-X PUT \
15+
-H "Authorization: token $TOKEN" \
16+
-H "Content-Length: 0" \
17+
-H "Accept: application/vnd.github.the-key-preview"
18+
```
19+
20+
To unlock a conversation, make a similarly constructed `DELETE` request:
21+
22+
``` command-line
23+
$ curl "https://api.github.com/repos/github/hubot/issues/1/lock" \
24+
-X DELETE \
25+
-H "Authorization: token $TOKEN" \
26+
-H "Accept: application/vnd.github.the-key-preview"
27+
```
28+
29+
#### How can I try it?
30+
31+
Starting today, developers can preview these new API methods. To use them during the preview period, you’ll need to provide the following custom [media type][media-types] in the `Accept` header:
32+
33+
```
34+
application/vnd.github.the-key-preview+json
35+
```
36+
37+
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.
38+
39+
Take a look at [the documentation][docs] and, if you have any questions, please [get in touch][contact].
40+
41+
[contact]: https://github.com/contact?form%5Bsubject%5D=Issue+Locking+and+Unlocking+API+Preview
42+
[docs]: /v3/issues/#lock-an-issue
43+
[lock-an-issue]: https://help.github.com/articles/locking-conversations/
44+
[media-types]: /v3/media/
45+
[permissions]: https://help.github.com/articles/what-are-the-different-access-permissions/

content/v3/issues.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,56 @@ Name | Type | Description
144144
<%= headers 200 %>
145145
<%= json :full_issue %>
146146

147+
## Lock an issue
148+
149+
{{#tip}}
150+
151+
<a name="preview-period"></a>
152+
153+
The API to lock an issue is currently available for developers to preview.
154+
During the preview period, the API may change without advance notice.
155+
Please see the [blog post](/changes/2016-02-11-issue-locking-api) for full details.
156+
157+
To access the API during the preview period, you must provide a custom [media type](/v3/media) in the `Accept` header:
158+
159+
application/vnd.github.the-key-preview+json
160+
161+
{{/tip}}
162+
163+
Users with push access can lock an issue's conversation.
164+
165+
PUT /repos/:owner/:repo/issues/:number/lock
166+
167+
<%= fetch_content(:put_content_length) %>
168+
169+
### Response
170+
171+
<%= headers 204 %>
172+
173+
## Unlock an issue
174+
175+
{{#tip}}
176+
177+
<a name="preview-period"></a>
178+
179+
The API to unlock an issue is currently available for developers to preview.
180+
During the preview period, the API may change without advance notice.
181+
Please see the [blog post](/changes/2016-02-11-issue-locking-api) for full details.
182+
183+
To access the API during the preview period, you must provide a custom [media type](/v3/media) in the `Accept` header:
184+
185+
application/vnd.github.the-key-preview+json
186+
187+
{{/tip}}
188+
189+
Users with push access can unlock an issue's conversation.
190+
191+
DELETE /repos/:owner/:repo/issues/:number/lock
192+
193+
### Response
194+
195+
<%= headers 204 %>
196+
147197
## Custom media types
148198

149199
These are the supported media types for issues. You can read more about the

0 commit comments

Comments
 (0)