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.

Commit03ae7ee

Browse files
committed
Merge master
2 parents8ab8dc1 +af83294 commit03ae7ee

File tree

19 files changed

+160
-72
lines changed

19 files changed

+160
-72
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
kind:change
3+
title:Audit organization members for two-factor authentication
4+
created_at:2014-01-29
5+
author_name:pengwynn
6+
---
7+
8+
We've added a[new filter][filter] for listing members of an organization without
9+
[two-factor authentication][2fa-blog] enabled:
10+
11+
12+
<preclass="terminal">
13+
$ curl -H "Authorization: token [yours]" \
14+
https://api.github.com/orgs/octokit/members\?filter\=2fa_disabled
15+
</pre>
16+
17+
The new filter is available for owners of organizations with private
18+
repositories. Happy auditing and[send us your feedback or questions][contact].
19+
20+
[filter]:/v3/orgs/members/#audit-two-factor-auth
21+
[2fa-blog]:https://github.com/blog/1614-two-factor-authentication
22+
[contact]:https://github.com/contact?form[subject]=API+2FA+filter
23+

‎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.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ plus the relevant HTTP Header information.
517517
<preclass="terminal">
518518
$ curl https://api.github.com?callback=foo
519519

520-
foo({
520+
/**/foo({
521521
"meta": {
522522
"status": 200,
523523
"X-RateLimit-Limit": "5000",
@@ -533,14 +533,30 @@ foo({
533533
})
534534
</pre>
535535

536-
You can write a JavaScript handler to process the callback like this:
536+
You can write a JavaScript handler to process the callback. Here's a minimal example you can try out:
537537

538-
<pre><codeclass="language-javascript">function foo(response) {
538+
<pre><codeclass="language-html">&lt;html>
539+
&lt;head>
540+
&lt;script type="text/javascript">
541+
function foo(response) {
539542
var meta = response.meta
540543
var data = response.data
541544
console.log(meta)
542545
console.log(data)
543-
}</code></pre>
546+
}
547+
548+
var script = document.createElement('script');
549+
script.src = 'https://api.github.com?callback=foo'
550+
551+
document.getElementsByTagName('head')[0].appendChild(script);
552+
&lt;/script>
553+
&lt;/head>
554+
555+
&lt;body>
556+
&lt;p>Open up your browser's console.&lt;/p>
557+
&lt;/body>
558+
559+
&lt;/html></code></pre>
544560

545561
All of the headers are the same String value as the HTTP Headers with one
546562
notable exception: Link. Link headers are pre-parsed for you and come

‎content/v3/activity/watching.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,15 @@ List repositories being watched by the authenticated user.
5151

5252
GET /repos/:owner/:repo/subscription
5353

54-
###Response
54+
###Response if you are subscribed to the repository
5555

5656
<%= headers 200 %>
5757
<%= json:repo_subscription %>
5858

59+
###Response if you are not subscribed to the repository
60+
61+
<%= headers 404 %>
62+
5963
##Set a Repository Subscription
6064

6165
PUT /repos/:owner/:repo/subscription

‎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: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ additional permission, but don’t forget that users can always say no.
9696
Check out the[Basics of Authentication guide][basics auth guide] which
9797
provides tips on handling modifiable token scopes.
9898

99+
####Normalized scopes
100+
101+
When requesting multiple scopes, the token will be saved with a normalized list
102+
of scopes, discarding those that are implicitly included by another requested
103+
scope. For example, requesting`user,gist,user:email` will result in a
104+
token with`user` and`gist` scopes only since the access granted with
105+
`user:email` scope[is included](#scopes) in the`user` scope.
106+
99107
###3. Use the access token to access the API
100108

101109
The access token allows you to make requests to the API on a behalf of a user.
@@ -153,13 +161,13 @@ accepts.
153161
Name | Description
154162
-----|-----------|
155163
`(no scope)`| Grants read-only access to public information (includes public user profile info, public repository info, and gists)
156-
`user` | Grants read/write access to profile info only. Note that this scope includes`user:email` and`user:follow`.
164+
`user` | Grants read/write access to profile info only. Note: this scope includes`user:email` and`user:follow`.
157165
`user:email`| Grants read access to a user's email addresses.
158166
`user:follow`| Grants access to follow or unfollow other users.
159167
`public_repo`| Grants read/write access to code, commit statuses, and deployment statuses for public repositories and organizations.
160168
`repo`| Grants read/write access to code, commit statuses, and deployment statuses for public and private repositories and organizations.
161-
`repo:status`| Grants 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.
162169
`repo:deployment`| Grants access to[deployment statuses][deployments] for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses,*without* granting access to the code.
170+
`repo:status`| Grants 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.
163171
`delete_repo`| Grants access to delete adminable repositories.
164172
`notifications`| Grants read access to a user's notifications.`repo` also provides this access.
165173
`gist`| Grants write access to gists.

‎content/v3/orgs/members.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ will be redirected to the [public members list](#public-members-list).
1717

1818
GET /orgs/:org/members
1919

20+
###Parameters {#audit-two-factor-auth}
21+
22+
Name | Type | Description
23+
--------|---------|--------------
24+
`filter`|`string` | Filter members returned in the list. Can be one of:<br/>*`2fa_disabled`: Members without[two-factor authentication][2fa-blog] enabled. Available for owners of organizations with private repositories.<br/>*`all`: All members the authenticated user can see.<br/><br/>Default:`all`
25+
26+
[2fa-blog]:https://github.com/blog/1614-two-factor-authentication
27+
2028
###Response
2129

2230
<%= headers 200 %>

‎content/v3/pulls.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,20 @@ Name | Description
2323
-----|-----------|
2424
`self`| The API location of this Pull Request.
2525
`html`| The HTML location of this Pull Request.
26-
`comments`| The API location of this Pull Request's Issue comments.
27-
`review_comments`| The API location of this Pull Request's Review comments.
28-
`statuses`| The API location of this Pull Request's commit statuses, which are the statuses of its`head` branch.
26+
`issue`| The API location of this Pull Request's[Issue](/v3/issues/).
27+
`comments`| The API location of this Pull Request's[Issue comments](/v3/issues/comments/).
28+
`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.
30+
`commits`|The API location of this Pull Request's[commits](#list-commits-on-a-pull-request).
31+
`statuses`| The API location of this Pull Request's[commit statuses](/v3/repos/statuses/), which are the statuses of its`head` branch.
2932

3033
##List pull requests
3134

3235
GET /repos/:owner/:repo/pulls
3336

3437
###Parameters
3538

36-
Name | Type | Description
39+
Name | Type | Description
3740
-----|------|--------------
3841
`state`|`string` | Either`open` or`closed` to filter by state. Default:`open`
3942
`head`|`string` | Filter pulls by head user and branch name in the format of`user:ref-name`. Example:`github:new-script-format`.
@@ -99,7 +102,7 @@ would namespace `head` with a user like this: `username:branch`.
99102
You can also create a Pull Request from an existing Issue by passing an
100103
Issue number instead of`title` and`body`.
101104

102-
Name | Type | Description
105+
Name | Type | Description
103106
-----|------|--------------
104107
`issue`|`number` |**Required**. The issue number in this repository to turn into a Pull Request.
105108

@@ -122,7 +125,7 @@ Name | Type | Description
122125

123126
###Input
124127

125-
Name | Type | Description
128+
Name | Type | Description
126129
-----|------|--------------
127130
`title`|`string` | The title of the pull request.
128131
`body`|`string` | The contents of the pull request.
@@ -179,7 +182,7 @@ Note: The response includes a maximum of 250 commits. If you are working with a
179182

180183
###Input
181184

182-
Name | Type | Description
185+
Name | Type | Description
183186
-----|------|-------------
184187
`commit_message`|`string`| The message that will be used for the merge commit
185188

‎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

‎content/v3/repos.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ Name | Type | Description
188188

189189
##List contributors
190190

191+
List contributors to the specified repository, sorted by the number of commits per contributor in descending order.
192+
191193
GET /repos/:owner/:repo/contributors
192194

193195
###Parameters

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp