Skip to content

Commit 1699d5e

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent b6c9ca3 commit 1699d5e

File tree

8 files changed

+38
-39
lines changed

8 files changed

+38
-39
lines changed

content/changes/2013-04-25-deprecating-merge-commit-sha.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
confusion.
1414

1515
To help current API consumers, we've [documented the
16-
attribute](/v3/pulls/#mergability) for improved understanding.
16+
attribute](/v3/pulls/#get-a-single-pull-request) for improved understanding.
1717

1818
To protect future API consumers from this confusion, we have
1919
[deprecated](/v3/versions/#v3-deprecations) the `merge_commit_sha` attribute, and we will

content/v3/git/trees.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,30 @@ title: Git Trees | GitHub API
1313

1414
### Response
1515

16-
<%= headers 200 %>
17-
<%= json :tree %>
18-
1916
{{#tip}}
2017

2118
If `truncated` is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, you can clone the repository and iterate over the Git data locally.
2219

2320
{{/tip}}
2421

22+
<%= headers 200 %>
23+
<%= json :tree %>
24+
2525
## Get a Tree Recursively
2626

2727
GET /repos/:owner/:repo/git/trees/:sha?recursive=1
2828

2929
### Response
3030

31-
<%= headers 200 %>
32-
<%= json :tree_extra %>
33-
34-
3531
{{#tip}}
3632

3733
If `truncated` is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time.
3834

3935
{{/tip}}
4036

37+
<%= headers 200 %>
38+
<%= json :tree_extra %>
39+
4140
## Create a Tree
4241

4342
The tree creation API will take nested entries as well. If both a

content/v3/pulls.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Name | Type | Description
4444
`sort`|`string`| What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). Default: `created`
4545
`direction`|`string`| The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`.
4646

47-
4847
### Response
4948

5049
<%= headers 200, :pagination => default_pagination_rels %>
@@ -56,10 +55,7 @@ Name | Type | Description
5655

5756
### Response
5857

59-
<%= headers 200 %>
60-
<%= json :full_pull %>
61-
62-
### Mergability
58+
{{#tip}}
6359

6460
Each time the pull request receives new commits, GitHub creates a merge commit
6561
to _test_ whether the pull request can be automatically merged into the base
@@ -69,16 +65,19 @@ however, this attribute is [deprecated](/v3/versions/#v3-deprecations) and is sc
6965
removal in the next version of the API. The Boolean `mergeable` attribute will
7066
remain to indicate whether the pull request can be automatically merged.
7167

72-
The value of the `mergeable` attribute can be `true`, `false`, or `null`. If
68+
The value of the `mergeable` attribute can be `true`, `false`, or `null`. If
7369
the value is `null`, this means that the mergeability hasn't been computed yet,
7470
and a background job was started to compute it. Give the job a few moments to
7571
complete, and then submit the request again. When the job is complete, the
7672
response will include a non-`null` value for the `mergeable` attribute.
7773

78-
### Alternative Response Formats
74+
{{/tip}}
7975

8076
Pass the appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
8177

78+
<%= headers 200 %>
79+
<%= json :full_pull %>
80+
8281
## Create a pull request
8382

8483
POST /repos/:owner/:repo/pulls

content/v3/repos/commits.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ Name | Type | Description
3737

3838
### Response
3939

40-
<%= headers 200 %>
41-
<%= json(:full_commit) %>
42-
43-
Note: Diffs with binary data will have no 'patch' property. Pass the
40+
Diffs with binary data will have no 'patch' property. Pass the
4441
appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and
4542
patch formats.
4643

44+
<%= headers 200 %>
45+
<%= json(:full_commit) %>
46+
4747
## Compare two commits
4848

4949
GET /repos/:owner/:repo/compare/:base...:head
@@ -56,10 +56,10 @@ Both `:base` and `:head` must be branch names in `:repo`. To compare branches ac
5656

5757
The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in reverse chronological order.
5858

59-
<%= json :commit_comparison %>
60-
6159
Pass the appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
6260

61+
<%= json :commit_comparison %>
62+
6363
### Working with large comparisons
6464

6565
The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [Commit List API](/v3/repos/commits/#list-commits-on-a-repository) to enumerate all commits in the range.

content/v3/repos/contents.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ Name | Type | Description
6464

6565
The response will be an array of objects, one object for each item in the directory.
6666

67-
<%= headers 200 %>
68-
<%= json :directory_content %>
69-
70-
Note: When listing the contents of a directory, submodules have their "type"
67+
When listing the contents of a directory, submodules have their "type"
7168
specified as "file". Logically, the value *should* be "submodule". This behavior
7269
exists in API v3 [for backwards compatibility purposes](https://github.com/github/developer.github.com/commit/1b329b04cece9f3087faa7b1e0382317a9b93490).
7370
In the next major version of the API, the type will be returned as "submodule".
7471

72+
<%= headers 200 %>
73+
<%= json :directory_content %>
74+
7575
### Response if content is a symlink
7676

7777
If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the API responds with the content of the file (in the [format shown above](#response-if-content-is-a-file)).
@@ -83,14 +83,14 @@ Otherwise, the API responds with an object describing the symlink itself:
8383

8484
### Response if content is a submodule
8585

86-
<%= headers 200 %>
87-
<%= json :submodule_content %>
88-
8986
The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository.
9087
Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit.
9188

9289
If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values.
9390

91+
<%= headers 200 %>
92+
<%= json :submodule_content %>
93+
9494
## Create a file
9595

9696
This method creates a new file in a repository

content/v3/repos/releases.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,17 @@ This may leave an empty asset with a state of `"new"`. It can be safely deleted
195195

196196
### Response
197197

198-
<%= headers 200 %>
199-
<%= json :release_asset %>
198+
{{#tip}}
200199

201200
If you want to download the asset's binary content, pass a media type of
202-
`"application/octet-stream"`. The API will either redirect the client to the
201+
`"application/octet-stream"`. The API will either redirect the client to the
203202
location, or stream it directly if possible. API clients should handle both a
204203
`200` or `302` response.
205204

206-
<%= headers 302 %>
205+
{{/tip}}
206+
207+
<%= headers 200 %>
208+
<%= json :release_asset %>
207209

208210
## Edit a release asset
209211

content/v3/repos/statistics.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,17 @@ which is usually master; pushing to the default branch resets the statistics cac
2828

2929
### Response
3030

31-
<%= headers 200 %>
32-
<%= json(:repo_stats_contributors) %>
33-
3431
* `total` - The Total number of commits authored by the contributor.
3532

36-
**Weekly Hash**
33+
Weekly Hash (`weeks` array):
3734

3835
* `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time).
3936
* `a` - Number of additions
4037
* `d` - Number of deletions
4138
* `c` - Number of commits
4239

40+
<%= headers 200 %>
41+
<%= json(:repo_stats_contributors) %>
4342

4443
## Get the last year of commit activity data {#commit-activity}
4544

content/v3/users.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ information](/v3/#authentication) with your request).
1919

2020
### Response
2121

22-
<%= headers 200 %>
23-
<%= json :full_user %>
24-
2522
Note: The returned email is the user's publicly visible email address
2623
(or `null` if the user has not [specified a public email address in their profile](https://github.com/settings/profile)).
2724

25+
<%= headers 200 %>
26+
<%= json :full_user %>
27+
2828
## Get the authenticated user
2929

3030
GET /user

0 commit comments

Comments
 (0)