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

Commit c3932d2

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent 8fbf17d commit c3932d2

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: Commit Reference SHA-1 API is now official
3+
author_name: mikemcquaid
4+
---
5+
6+
We're making the [Commit Reference SHA-1 API][api-enhancements-blog-post] part of the official GitHub API.
7+
8+
During the preview period you needed to provide the `application/vnd.github.chitauri-preview+sha` preview media type in the `Accept` header to opt-in to the changes. Now that the preview period has ended the custom [media type][custom-media-types] has changed to `application/vnd.github.v3.sha` (but the preview type will continue to work).
9+
10+
If you have any questions or feedback, please [get in touch with us][contact]!
11+
12+
[api-enhancements-blog-post]: /changes/2016-02-24-commit-reference-sha-api/
13+
[custom-media-types]: /v3/media/
14+
[contact]: https://github.com/contact?form[subject]=Commit+Reference+SHA-1+API

content/v3/media.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ The Commit, Commit Comparison, and Pull Request resources support
125125

126126
application/vnd.github.VERSION.patch
127127

128+
### sha
129+
130+
application/vnd.github.VERSION.sha
131+
128132
## Repository contents
129133

130134
### Raw

content/v3/repos/commits.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,14 @@ patch formats.
4545

4646
## Get the SHA-1 of a commit reference
4747

48-
{{#tip}}
49-
50-
<a name="preview-period"></a>
51-
52-
The API to get the SHA-1 of a commit reference is currently available for developers to preview.
53-
During the preview period, the API may change without advance notice.
54-
Please see the [blog post](/changes/2016-02-24-commit-reference-sha-api) for full details.
55-
56-
To access the API you must provide a custom [media type](/v3/media) in the `Accept` header:
57-
58-
application/vnd.github.chitauri-preview+sha
59-
60-
{{/tip}}
61-
6248
Users with read access can get the SHA-1 of a commit reference:
6349

6450
GET /repos/:owner/:repo/commits/:ref
6551

52+
To access the API you must provide a custom [media type](/v3/media) in the `Accept` header:
53+
54+
application/vnd.github.VERSION.sha
55+
6656
To check if a remote reference's SHA-1 is the same as your local reference's SHA-1, make a `GET` request and provide the current SHA-1 for the local reference as the ETag.
6757

6858
### Response

0 commit comments

Comments
 (0)