Skip to content

Commit 118dfa5

Browse files
committed
merge publi/master into internal/master
2 parents 7f141e5 + 6e85789 commit 118dfa5

8 files changed

Lines changed: 120 additions & 8 deletions

File tree

content/changes/2014-02-13-exposing-the-page-api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
author_name: gjtorikian
66
---
77

8-
We've created [a new an API to GitHub Pages](/v3/repos/pages/). This API is accessible
8+
We've created [a new API to GitHub Pages](/v3/repos/pages/). This API is accessible
99
by owners of a Pages repo, whether it's owned by an individual or an organization.
1010

1111
With the Pages API, you can get information about your site, as well as details

content/changes/2014-02-19-repo-contributors-for-empty-repos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Repository Contributors and Empty Repositories
44
created_at: 2014-02-20
55
author_name: izuzak
66
---
7-
7+
88
We've made a small change to the [Repository Contributors API](/v3/repos/#list-contributors) in the way empty repositories are handled. Previously, the API returned a `404 Not Found` status when the list of contributors was fetched for an empty repository. To improve consistency with other API endpoints and reduce confusion, the API now returns a `204 No Content` status instead.
99

1010
If you notice any strangeness, [just let us know](https://github.com/contact?form%5Bsubject%5D=APIv3).

content/guides/basics-of-authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ We can do whatever we want with our results. In this case, we'll just dump them
175175
#!html+erb
176176
<p>Hello, <%= login %>!</p>
177177
<p>
178-
<% if !email.empty? %> It looks like your public email address is <%= email %>.
178+
<% if !email.nil? && !email.empty? %> It looks like your public email address is <%= email %>.
179179
<% else %> It looks like you don't have a public email. That's cool.
180180
<% end %>
181181
</p>

content/v3/activity/events/types.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ Key | Type | Description
3636

3737
Represents a created repository, branch, or tag.
3838

39+
Note: webhooks will not receive this event for created repositories.
40+
3941
### Hook name
4042

4143
`create`

content/v3/issues.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Name | Type | Description
7272
### Response
7373

7474
<%= headers 200 %>
75-
<%= json :issue %>
75+
<%= json :full_issue %>
7676

7777
<div class="alert">
7878
<p>
@@ -111,7 +111,7 @@ Name | Type | Description
111111
<%= headers 201,
112112
:Location =>
113113
'https://api.github.com/repos/user/repo/issues/1' %>
114-
<%= json :issue %>
114+
<%= json :full_issue %>
115115

116116
## Edit an issue
117117

@@ -145,7 +145,7 @@ Name | Type | Description
145145
### Response
146146

147147
<%= headers 200 %>
148-
<%= json :issue %>
148+
<%= json :full_issue %>
149149

150150
## Custom media types
151151

content/v3/oauth.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ can specify multiple scopes by separating them with a comma:
192192
scope=user,public_repo
193193

194194
## Common errors for the authorization request
195+
<<<<<<< HEAD
195196

196197
There are a few things that can go wrong in the process of obtaining an
197198
OAuth token for a user. In the initial authorization request phase,
@@ -260,6 +261,106 @@ match what you received in the first request for authorization you will
260261
receive this error.
261262

262263
<%= json :error => :bad_verification_code %>
264+
=======
265+
266+
There are a few things that can go wrong in the process of obtaining an
267+
OAuth token for a user. In the initial authorization request phase,
268+
these are some errors you might see:
269+
270+
### Application Suspended
271+
272+
If the OAuth application you set up has been suspended (due to reported
273+
abuse, spam, or a mis-use of the API), GitHub will redirect to the
274+
registered callback URL with the following parameters summerizing the
275+
error:
276+
277+
http://your-application.com/callback?error=application_suspended
278+
&error_description=Your+application+has+been+suspended.+Contact+support@github.com.
279+
&error_uri=http://developer.github.com/v3/oauth/%23application-suspended
280+
&state=xyz
281+
282+
Please contact [support](https://github.com/contact) to solve issues
283+
with suspended applications.
284+
285+
### Redirect URI mismatch
286+
287+
If you provide a redirect_uri that doesn't match what you've registered
288+
with your application, GitHub will redirect to the registered callback
289+
URL with the following parameters summerizing the error:
290+
291+
http://your-application.com/callback?error=redirect_uri_mismatch
292+
&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.
293+
&error_uri=http://developer.github.com/v3/oauth/%23redirect-uri-mismatch
294+
&state=xyz
295+
296+
To correct this error, either provide a redirect_uri that matches what
297+
you registered or leave out this parameter to use the default one
298+
registered with your application.
299+
300+
### Access denied
301+
302+
If the user rejects access to your application, GItHub will redirect to
303+
the registered callback URL with the following parameters summerizing
304+
the error:
305+
306+
http://your-application.com/callback?error=access_denied
307+
&error_description=The+user+has+denied+your+application+access.
308+
&error_uri=http://developer.github.com/v3/oauth/%23access-denied
309+
&state=xyz
310+
311+
There's nothing you can do here as users are free to choose not to use
312+
your application. More often that not, users will just close the window
313+
or press back in their browser, so it is likely that you'll never see
314+
this error.
315+
316+
## Common errors for the access token request
317+
318+
In the second phase of exchanging a code for an access token, there are
319+
an additional set of errors that can occur. The format of these
320+
responses is determined by the accept header you pass. The following
321+
examples only show JSON responses.
322+
323+
### Incorrect client credentials
324+
325+
If the client\_id and or client\_secret you pass are incorrect you will
326+
receive this error response.
327+
328+
<%= json :error => :incorrect_client_credentials,
329+
:error_description => "The client_id and/or client_secret passed are incorrect.",
330+
:error_uri => "http://developer.github.com/v3/oauth/#incorrect-client-credentials"
331+
%>
332+
333+
To solve this error, go back and make sure you have the correct
334+
credentials for your oauth application. Double check the `client_id` and
335+
`client_secret` to make sure they are correct and being passed correctly
336+
to GitHub.
337+
338+
### Redirect URI mismatch(2)
339+
340+
If you provide a redirect_uri that doesn't match what you've registered
341+
with your application, you will receive this error message:
342+
343+
<%= json :error => :redirect_uri_mismatch,
344+
:error_description => "The redirect_uri MUST match the registered callback URL for this application.",
345+
:error_uri => "http://developer.github.com/v3/oauth/#redirect-uri-mismatch(2)"
346+
%>
347+
348+
To correct this error, either provide a redirect_uri that matches what
349+
you registered or leave out this parameter to use the default one
350+
registered with your application.
351+
352+
### Bad verification code
353+
354+
If the verification code you pass is incorrect, expired, or doesn't
355+
match what you received in the first request for authorization you will
356+
receive this error.
357+
358+
<%= json :error => :bad_verification_code,
359+
:error_description => "The code passed is incorrect or expired.",
360+
:error_uri => "http://developer.github.com/v3/oauth/#bad-verification-code"
361+
%>
362+
363+
>>>>>>> master
263364
264365
To solve this error, start the [OAuth process over from the beginning](#redirect-users-to-request-github-access)
265366
and get a new code.

lib/resources.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module Helpers
4040
:ymendel => 'b1b1d33e0655e841d4fd8467359c58d0',
4141
:mastahyeti => '8caa0afdae1a934c30a1998472c63134',
4242
:atmos => 'a86224d72ce21cd9f5bee6784d4b06c7',
43-
:kdaigle => 'bc622cf1dc277323515fd4d7ed66ed24',
43+
:kdaigle => 'dd18bb36fa5f06e45843ff8de33b793e',
4444
:gjtorikian => 'befd819b3fced8c6bd3dba7e633dd068',
4545
:izuzak => 'ff743b4cba28cc47ad65cb90212c1e51',
4646
:spicycode => '7ce90d712fab09421b7f2cf955b9a4c8'
@@ -731,6 +731,10 @@ def text_html(response, status, head = {})
731731
"updated_at" => "2011-04-22T13:33:48Z"
732732
}
733733

734+
FULL_ISSUE = ISSUE.merge({
735+
"closed_by" => USER
736+
})
737+
734738
ISSUE_COMMENT = {
735739
"id" => 1,
736740
"url" => "https://api.github.com/repos/octocat/Hello-World/issues/comments/1",
@@ -1747,7 +1751,7 @@ def text_html(response, status, head = {})
17471751
FEEDS = {
17481752
:timeline_url => "https://github.com/timeline",
17491753
:user_url => "https://github.com/{user}",
1750-
:current_user_public => "https://github.com/defunkt",
1754+
:current_user_public_url => "https://github.com/defunkt",
17511755
:current_user_url => "https://github.com/defunkt.private?token=abc123",
17521756
:current_user_actor_url => "https://github.com/defunkt.private.actor?token=abc123",
17531757
:current_user_organization_url => "https://github.com/organizations/{org}/defunkt.private.atom?token=abc123",

static/search-index.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@
155155
"title": "OAuth",
156156
"section": "API/Overview"
157157
},
158+
{
159+
"url": "/v3/oauth_authorizations/",
160+
"title": "Authorizations",
161+
"section": "API/Overview"
162+
},
158163
{
159164
"url": "/v3/orgs/",
160165
"title": "Organizations",

0 commit comments

Comments
 (0)