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

Commit 03ae7ee

Browse files
committed
Merge master
2 parents 8ab8dc1 + af83294 commit 03ae7ee

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+
<pre class="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
<pre class="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 304 OK
499+
HTTP/1.1 304 Not 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
<pre class="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><code class="language-javascript">function foo(response) {
538+
<pre><code class="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.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy