8000 Merge branch 'master' into contents_crud · fth-ship/developer.github.com@7503f15 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7503f15

Browse files
committed
Merge branch 'master' into contents_crud
2 parents 9acb3f8 + 7b5a677 commit 7503f15

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+728
-276
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
kind: change
3+
title: User Agent now mandatory
4+
created_at: 2013-04-24
5+
author_name: pengwynn
6+
---
7+
8+
After an almost six week grace period, we're now enforcing the [User Agent
9+
header][1] for all API requests. Most HTTP libraries (including cURL)
10+
set this header by default. If you're experiencing an increase in `403`
11+
responses, be sure and check your code.
12+
13+
[1]: /v3/#user-agent-required
14+
15+
If you have any questions or feedback, please drop us a line at
16+
[support@github.com](mailto:support@github.com?subject=User Agent Requirement).
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
kind: change
3+
title: Deprecating a Confusing Attribute in the Pull Request API
4+
created_at: 2013-04-25
5+
author_name: jasonrudolph
6+
---
7+
8+
When you get the details for a Pull Request from the API, the
9+
[response](/v3/pulls/#get-a-single-pull-request) provides everything there is to
10+
know about that Pull Request. In addition to the useful information provided in
11+
the API response, the JSON also includes the `merge_commit_sha` attribute. This
12+
attribute is a frequent source of misunderstanding, and we aim to remove the
13+
confusion.
14+
15+
To help current API consumers, we've [documented the
16+
attribute](/v3/pulls/#mergability) for improved understanding.
17+
18+
To protect future API consumers from this confusion, we have
19+
[deprecated](/#expected-changes) the `merge_commit_sha` attribute, and we will
20+
remove it in the next major version of the API.
21+
22+
As always, if you have any questions or feedback, please drop us a line at
23+
[support@github.com](mailto:support@github.com?subject=Deprecating merge_commit_sha).
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
kind: change
3+
title: Improved Support for Submodules in the Repository Contents API
4+
created_at: 2013-04-30
5+
author_name: jasonrudolph
6+
---
7+
8+
When you view a repository with a submodule on github.com, you get useful links and information for the submodule.
9+
10+
[![Repository Contents with Submodule](/images/posts/submodule-links.png)][screenshot]
11+
12+
Today we're making that data available in the [Repository Contents API][docs].
13+
14+
<pre class="terminal">
15+
curl https://api.github.com/repos/jquery/jquery/contents/test/qunit
16+
17+
{
18+
"name": "qunit",
19+
"path": "test/qunit",
20+
"type": "submodule",
21+
"submodule_git_url": "git://github.com/jquery/qunit.git",
22+
"sha": "6ca3721222109997540bd6d9ccd396902e0ad2f9",
23+
"size": 0,
24+
"url": "https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master",
25+
"git_url": "https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9",
26+
"html_url": "https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9",
27+
"_links": {
28+
"self": "https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master",
29+
"git": "https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9",
30+
"html": "https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9"
31+
}
32+
}
33+
</pre>
34+
35+
If you have any questions or feedback, please drop us a line at
36+
[support@github.com](mailto:support@github.com?subject=Submodules in Repository Contents API).
37+
38+
[docs]: /v3/repos/contents/#get-contents
39+
[screenshot]: /images/posts/submodule-links.png
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
kind: change
3+
title: Commit Statuses Now Available for Branches and Tags
4+
created_at: 2013-04-30
5+
author_name: foca
6+
---
7+
8+
Last week we announced [support for build statuses in the branches page][blog].
9+
Now we are extending this to the API. The [API endpoint for commit statuses][doc]
10+
has been extended to allow branch and tag names, as well as commit SHAs.
11+
12+
<pre class="terminal">
13+
curl https://api.github.com/repos/rails/rails/statuses/3-2-stable
14+
</pre>
15+
16+
Enjoy.
17+
18+
[blog]: https://github.com/blog/1484-check-the-status-of-your-branches
19+
[doc]: http://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref

content/guides/basics-of-authentication.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ In _server.rb_, add a route to specify what the callback should do:
8686
result = RestClient.post("https://github.com/login/oauth/access_token",
8787
{:client_id => CLIENT_ID,
8888
:client_secret => CLIENT_SECRET,
89-
:code => session_code},
90-
:accept => :json)
89+
:code => session_code
90+
},{
91+
:accept => :json
92+
})
9193
access_token = JSON.parse(result)["access_token"]
9294
end
9395

content/guides/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ levels, that indicate what information this token can access. In this case,
183183
we're setting up the token with _repo_ access, the most permissive scope in the
184184
GitHub API, allowing access to read and write to private repositories. See [the
185185
scopes docs][scopes] for a full list of scopes. You should **only** request
186-
scopes that your application actually needs, in order to not freighten users with
186+
scopes that your application actually needs, in order to not frighten users with
187187
potentially invasive actions.
188188

189189
The `201` status code tells us that the call was successful, and the JSON returned

content/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ you have any problems or requests please contact
1010

1111
For the new API v3, start browsing the resources on the right >>
1212

13-
View the [API Changelog](#changes) for information on existing and
13+
View the [API Changelog](/changes) for information on existing and
1414
planned changes to the API.
1515

1616
## Current Version
@@ -39,11 +39,14 @@ objects.
3939
* `[ ]` `master_branch` becomes `default_branch`.
4040
* `[ ]` `integrate_branch` on the [repo API](/v3/repos/#get) will no longer be
4141
returned.
42+
* `[ ]` `merge_commit_sha` on the [pull request API](/v3/pulls/#get-a-single-pull-request)
43+
will no longer be returned.
4244
* `[ ]` Use the `private` attribute when creating a private repository,
4345
instead of setting `public` to false.
4446
* `[ ]` Use JSON to POST to the "repos/:owner/:repo/forks" endpoint, instead of a query string.
4547
* `[✓]` <del>User Emails come back [as a hash][v3-email] instead of a string.</del>
4648
* `[ ]` Remove the unused "bio" field for Users.
49+
* `[ ]` When listing the contents of a directory in the [Repository Contents API](/v3/repos/contents/#get-contents), fix the `type` value returned for submodules: change the value to `"submodule"` (instead of `"file"`).
4750

4851
### Breaking Beta Changes
4952

content/v3/activity/notifications.md

Lines changed: 0 additions & 20 deletions
4366
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,6 @@ on GitHub.com](https://github.com/notifications).
108108

109109
### Input
110110

111-
unread
112-
: **Boolean** Changes the unread status of the threads.
113-
114-
read
115-
: **Boolean** Inverse of "unread".
116-
117111
last_read_at
118112
: _Optional_ **Time** Describes the last point that notifications were checked. Anything
119113
updated since this time will not be updated. Default: Now. Expected in ISO
@@ -132,12 +126,6 @@ from the [default view on GitHub.com](https://github.com/notifications).
132126

133127
### Input
134128

135-
unread
136-
: **Boolean** Changes the unread status of the threads.
137-
138-
read
139-
: **Boolean** Inverse of "unread".
140-
141129
last_read_at
142130
: _Optional_ **Time** Describes the last point that notifications were checked. Anything
143131
updated since this time will not be updated. Default: Now. Expected in ISO
@@ -160,14 +148,6 @@ updated since this time will not be updated. Default: Now. Expected in ISO
160148

161149
PATCH /notifications/threads/:id
162150

163-
### Input
164-
165-
unread
166-
: **Boolean** Changes the unread status of the threads.
167-
168-
read
169-
: **Boolean** Inverse of "unread".
170-
171151
### Response
172152

173153
<%= headers 205 %>

content/v3/git/tags.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ lightweight tags.
2323

2424
Note that creating a tag object does not create the reference that
2525
makes a tag in Git. If you want to create an annotated tag in Git,
26-
you have to do this call to create the tag object, and then create
27-
the `refs/tags/[tag]` reference. If you want to create a lightweight
28-
tag, you simply have to create the reference - this call would be
29-
unnecessary.
26+
you have to do this call to create the tag object, and then
27+
[create](/v3/git/refs/#create-a-reference) the `refs/tags/[tag]` reference.
28+
If you want to create a lightweight tag, you only have to
29+
[create](/v3/git/refs/#create-a-reference) the tag reference - this call
30+
would be unnecessary.
3031

3132
POST /repos/:owner/:repo/git/tags
3233

@@ -54,6 +55,16 @@ tagger.email
5455
tagger.date
5556
: _Timestamp_ of when this object was tagged
5657

58+
### Example Input
59+
60+
<%= json "tag"=> "v0.0.1", \
61+
"message" => "initial version\n", \
62+
"object" => "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c", \
63+
"type" => "commit", \
64+
"tagger"=> \
65+
{"name" => "Scott Chacon", "email" => "schacon@gmail.com", \
66+
"date" => "2011-06-17T14:53:35-07:00"} %>
67+
5768
### Response
5869

5970
<%= headers 201,

content/v3/libraries.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ GitHub v3 API. Builds are available in [Maven Central](http://search.maven.org/
7272

7373
[uagithubengine]: http://github.com/owainhunt/uagithubengine
7474

75+
## OCaml
76+
77+
* [ocaml-github][ocaml-github]
78+
79+
[ocaml-github]: https://github.com/avsm/ocaml-github
80+
7581
## Perl
7682

7783
* [Pithub][pithub-github] ([CPAN][pithub-cpan])

0 commit comments

Comments
 (0)
0