Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commitaf83294

Browse files
committed
Merge 'upstream/master' into internal/master
2 parents8d06fec +c655b09 commitaf83294

File tree

10 files changed

+44
-38
lines changed

10 files changed

+44
-38
lines changed

‎content/guides/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,10 @@ The [ETag][etag] is a fingerprint of the response. If we pass that on subsequent
493493
we can tell the API to give us the resource again, only if it has changed:
494494

495495
<preclass="terminal">
496-
$ curl -i -H 'If-None-Match: "644b5b0155e6404a9cc4bd9d8b1ae730"' \
496+
$ curl -i -H 'If-None-Match: "bfd85cbf23ac0b0c8a29bee02e7117c6"' \
497497
https://api.github.com/users/defunkt
498498

499-
HTTP/1.1 304OK
499+
HTTP/1.1 304Not Modified
500500
</pre>
501501

502502
The`304` status indicates that the resource hasn't changed since the last time

‎content/v3/git/blobs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ read more about the use of media types in the API [here](/v3/media/).
3535
###Response
3636

3737
<%= headers 201,
38-
:Location => "https://api.github.com/git/:owner/:repo/blob/:sha" %>
39-
<%= json:sha => "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" %>
38+
:Location => "https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" %>
39+
<%= json:blob_after_create %>
4040

4141
##Custom media types
4242

‎content/v3/git/commits.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ title: Git Commits | GitHub API
2222

2323
###Parameters
2424

25-
Name | Type | Description
25+
Name | Type | Description
2626
-----|------|--------------
2727
`message`|`string` |**Required**. The commit message
2828
`tree`|`string` |**Required**. The SHA of the tree object this commit points to
@@ -41,7 +41,7 @@ in with the authenticated user's information and the current date.
4141

4242
Both the`author` and`commiter` parameters have the same keys:
4343

44-
Name | Type | Description
44+
Name | Type | Description
4545
-----|------|-------------
4646
`name`|`string` | The name of the author (or commiter) of the commit
4747
`email`|`string` | The email of the author (or commiter) of the commit
@@ -59,6 +59,5 @@ Name | Type | Description
5959
###Response
6060

6161
<%= headers 201,
62-
:Location => "https://api.github.com/git/:owner/:repo/commit/:sha" %>
62+
:Location => "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd" %>
6363
<%= json:new_commit %>
64-

‎content/v3/git/refs.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,21 @@ For a full refs listing, you'll get something that looks like:
4646

4747
###Parameters
4848

49-
Name | Type | Description
49+
Name | Type | Description
5050
-----|------|--------------
5151
`ref`|`type`| The name of the fully qualified reference (ie:`refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected.
5252
`sha`|`type`| The SHA1 value to set this reference to
5353

5454

5555
###Input
5656

57-
<%= json "ref"=>"refs/heads/master",\
58-
"sha"=>"827efc6d56897b048c772eb4087f854f46256132" %>
57+
<%= json "ref"=>"refs/heads/featureA",\
58+
"sha"=>"aa218f56b14c9653891f9e74264a383fa43fefbd" %>
5959

6060
###Response
6161

62-
<%= headers 201 %>
62+
<%= headers 201,\
63+
:Location => "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA" %>
6364
<%= json:ref %>
6465

6566
##Update a Reference
@@ -68,7 +69,7 @@ Name | Type | Description
6869

6970
###Parameters
7071

71-
Name | Type | Description
72+
Name | Type | Description
7273
-----|------|--------------
7374
`sha`|`type`| The SHA1 value to set this reference to
7475
`force`|`boolean`| Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to`false` will make sure you're not overwriting work. Default:`false`
@@ -81,8 +82,7 @@ Name | Type | Description
8182

8283
###Response
8384

84-
<%= headers 200,\
85-
:Location => "https://api.github.com/git/:owner/:repo/commit/:sha" %>
85+
<%= headers 200 %>
8686
<%= json:ref %>
8787

8888
##Delete a Reference
@@ -100,4 +100,3 @@ Example: Deleting a tag:
100100
###Response
101101

102102
<%= headers 204 %>
103-

‎content/v3/git/tags.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ would be unnecessary.
3333

3434
###Parameters
3535

36-
Name | Type | Description
36+
Name | Type | Description
3737
-----|------|--------------
3838
`tag`|`string`| The tag
3939
`message`|`string`| The tag message
@@ -43,7 +43,7 @@ Name | Type | Description
4343

4444
The`tagger` hash contains the following keys:
4545

46-
Name | Type | Description
46+
Name | Type | Description
4747
-----|------|--------------
4848
`name`|`string`| The name of the author of the tag
4949
`email`|`string`| The email of the author of the tag
@@ -63,6 +63,5 @@ Name | Type | Description
6363
###Response
6464

6565
<%= headers 201,
66-
:Location => "https://api.github.com/repos/:owner/:repo/git/tags/:sha" %>
66+
:Location => "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac" %>
6767
<%= json:gittag %>
68-

‎content/v3/git/trees.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ a new tree out.
3636

3737
###Parameters
3838

39-
Name | Type | Description
39+
Name | Type | Description
4040
-----|------|--------------
4141
`tree`|`array` of`hash`es |**Required**. Objects (of`path`,`mode`,`type`, and`sha`) specifying a tree structure
4242
`base_tree`|`string` | The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted.
4343

4444
The`tree` parameter takes the following keys:
4545

46-
Name | Type | Description
46+
Name | Type | Description
4747
-----|------|--------------
4848
`path`|`string`| The file referenced in the tree
4949
`mode`|`string`| The file mode; one of`100644` for file (blob),`100755` for executable (blob),`040000` for subdirectory (tree),`160000` for submodule (commit), or`120000` for a blob that specifies the path of a symlink
@@ -65,6 +65,5 @@ Name | Type | Description
6565
###Response
6666

6767
<%= headers 201,
68-
:Location => "https://api.github.com/repos/:owner/:repo/git/trees/:sha" %>
68+
:Location => "https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7" %>
6969
<%= json:tree_new %>
70-

‎content/v3/oauth.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,12 @@ accepts.
160160

161161
Name | Description
162162
-----|-----------|
163-
`(no scope)`| Public read-only access (includes public user profile info, publicrepo info, and gists)
163+
`(no scope)`| Public read-only access (includes public user profile info, publicrepositories info, and gists)
164164
`user` |Read/write access to profile info only. Note: this scope includes`user:email` and`user:follow`.
165165
`user:email`| Read access to a user's email addresses.
166166
`user:follow`| Access to follow or unfollow other users.
167-
`public_repo`| Read/write access to publicrepos and organizations.
168-
`repo`|Read/write access to public and privaterepos and organizations.
167+
`public_repo`| Read/write access to publicrepositories and organizations.
168+
`repo`|Create repository access and read/write access to public and privaterepositories and organizations.
169169
`repo:status`| Read/write access to public and private repository commit statuses. This scope is only necessary to grant other users or services access to private repository commit statuses without granting access to the code. The`repo` and`public_repo` scopes already include access to commit status for private and public repositories, respectively.
170170
`delete_repo`| Delete access to adminable repositories.
171171
`notifications`| Read access to a user's notifications.`repo` is accepted too.

‎content/v3/pulls.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Name | Description
2626
`issue`| The API location of this Pull Request's[Issue](/v3/issues/).
2727
`comments`| The API location of this Pull Request's[Issue comments](/v3/issues/comments/).
2828
`review_comments`| The API location of this Pull Request's[Review comments](/v3/pulls/comments/).
29+
`review_comment`| The[URL template](/v3/#hypermedia) to construct the API location for a[Review comment](/v3/pulls/comments/) in this Pull Request's repository.
2930
`commits`|The API location of this Pull Request's[commits](#list-commits-on-a-pull-request).
3031
`statuses`| The API location of this Pull Request's[commit statuses](/v3/repos/statuses/), which are the statuses of its`head` branch.
3132

@@ -35,7 +36,7 @@ Name | Description
3536

3637
###Parameters
3738

38-
Name | Type | Description
39+
Name | Type | Description
3940
-----|------|--------------
4041
`state`|`string` | Either`open` or`closed` to filter by state. Default:`open`
4142
`head`|`string` | Filter pulls by head user and branch name in the format of`user:ref-name`. Example:`github:new-script-format`.
@@ -101,7 +102,7 @@ would namespace `head` with a user like this: `username:branch`.
101102
You can also create a Pull Request from an existing Issue by passing an
102103
Issue number instead of`title` and`body`.
103104

104-
Name | Type | Description
105+
Name | Type | Description
105106
-----|------|--------------
106107
`issue`|`number` |**Required**. The issue number in this repository to turn into a Pull Request.
107108

@@ -124,7 +125,7 @@ Name | Type | Description
124125

125126
###Input
126127

127-
Name | Type | Description
128+
Name | Type | Description
128129
-----|------|--------------
129130
`title`|`string` | The title of the pull request.
130131
`body`|`string` | The contents of the pull request.
@@ -181,7 +182,7 @@ Note: The response includes a maximum of 250 commits. If you are working with a
181182

182183
###Input
183184

184-
Name | Type | Description
185+
Name | Type | Description
185186
-----|------|-------------
186187
`commit_message`|`string`| The message that will be used for the merge commit
187188

‎content/v3/pulls/comments.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ By default, Review Comments are ordered by ascending ID.
3333

3434
###Parameters
3535

36-
Name | Type | Description
36+
Name | Type | Description
3737
-----|------|--------------
3838
`sort`|`string` | Can be either`created` or`updated`. Default:`created`
3939
`direction`|`string` | Can be either`asc` or`desc`. Ignored without`sort` parameter.
@@ -60,7 +60,7 @@ Name | Type | Description
6060

6161
###Input
6262

63-
Name | Type | Description
63+
Name | Type | Description
6464
-----|------|--------------
6565
`body`|`string` |**Required**. The text of the comment
6666
`commit_id`|`string` |**Required**. The SHA of the commit to comment on.
@@ -82,7 +82,7 @@ Name | Type | Description
8282
Instead of passing`commit_id`,`path`, and`position` you can reply to
8383
an existing Pull Request Comment like this:
8484

85-
Name | Type | Description
85+
Name | Type | Description
8686
-----|------|--------------
8787
`body`|`string` |**Required**. The text of the comment
8888
`in_reply_to`|`number` |**Required**. The comment id to reply to.
@@ -99,7 +99,7 @@ Name | Type | Description
9999

100100
<%= headers 201,
101101
:Location =>
102-
"https://api.github.com/repos/:owner/:repo/pulls/comments/1" %>
102+
"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1" %>
103103
<%= json:pull_comment %>
104104

105105
##Edit a comment
@@ -108,7 +108,7 @@ Name | Type | Description
108108

109109
###Input
110110

111-
Name | Type | Description
111+
Name | Type | Description
112112
-----|------|--------------
113113
`body`|`string` |**Required**. The text of the comment
114114

‎lib/resources.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ def text_html(response, status, head = {})
395395
"issue_url"=>"https://api.github.com/repos/octocat/Hello-World/issues/1",
396396
"commits_url"=>"https://api.github.com/repos/octocat/Hello-World/pulls/1/commits",
397397
"review_comments_url"=>"https://api.github.com/repos/octocat/Hello-World/pulls/1/comments",
398+
"review_comment_url"=>"https://api.github.com/repos/octocat/Hello-World/pulls/comments/{number}",
398399
"comments_url"=>"https://api.github.com/repos/octocat/Hello-World/issues/1/comments",
399400
"statuses_url"=>"https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e",
400401
"number"=>1,
@@ -430,6 +431,8 @@ def text_html(response, status, head = {})
430431
"https://api.github.com/repos/octocat/Hello-World/issues/1/comments"},
431432
"review_comments"=>{'href'=>
432433
"https://api.github.com/repos/octocat/Hello-World/pulls/1/comments"},
434+
"review_comment"=>{'href'=>
435+
"https://api.github.com/repos/octocat/Hello-World/pulls/comments/{number}"},
433436
"commits"=>{'href'=>
434437
"https://api.github.com/repos/octocat/Hello-World/pulls/1/commits"},
435438
"statuses"=>{'href'=>
@@ -1350,8 +1353,8 @@ def text_html(response, status, head = {})
13501353
}
13511354

13521355
REF={
1353-
"ref"=>"refs/heads/sc/featureA",
1354-
"url"=>"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/sc/featureA",
1356+
"ref"=>"refs/heads/featureA",
1357+
"url"=>"https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA",
13551358
"object"=>{
13561359
"type"=>"commit",
13571360
"sha"=>"aa218f56b14c9653891f9e74264a383fa43fefbd",
@@ -1575,10 +1578,16 @@ def text_html(response, status, head = {})
15751578
BLOB={
15761579
:content=>"Content of the blob",
15771580
:encoding=>"utf-8",
1581+
:url=>"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15",
15781582
:sha=>"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15",
15791583
:size=>100
15801584
}
15811585

1586+
BLOB_AFTER_CREATE={
1587+
:url=>"https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15",
1588+
:sha=>"3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15"
1589+
}
1590+
15821591
CONTENT_CRUD={
15831592
"content"=>{
15841593
"name"=>"hello.txt",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp