Skip to content

Commit 5409d1a

Browse files
committed
Merge branch 'master' into dbussink/api_timezone_improvements
2 parents 4c6aeb1 + 5acc872 commit 5409d1a

File tree

6 files changed

+331
-77
lines changed

6 files changed

+331
-77
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
kind: change
3+
title: New Payload format for Deployments
4+
created_at: 2014-03-03
5+
author_name: atmos
6+
---
7+
8+
As we [iterate on the preview][january-deployment-api-post] for the new Deployment API, we're making sure that it's friendly to work with for the apps built on top of it.
9+
10+
## Deserialize Deployment Payloads
11+
12+
To make the API even easier to use, we'll now return your custom payload as a JSON object along with the rest of the Deployment resource. No need to parse it as JSON again.
13+
14+
## Code you need to update
15+
16+
You should only need to remove the JSON parsing if you're taking advantage of the custom payloads. The formats for creating Deployments remain unchanged.
17+
18+
As always, if you have any questions or feedback, please [get in touch][contact].
19+
20+
[january-deployment-api-post]: /changes/2014-01-09-preview-the-new-deployments-api/
21+
[contact]: https://github.com/contact?form[subject]=Deployments+API

content/v3/oauth.md

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -198,76 +198,6 @@ can specify multiple scopes by separating them with a comma:
198198
scope=user,public_repo
199199

200200
## Common errors for the authorization request
201-
<<<<<<< HEAD
202-
203-
There are a few things that can go wrong in the process of obtaining an
204-
OAuth token for a user. In the initial authorization request phase,
205-
these are some errors you might see:
206-
207-
### Application Suspended
208-
209-
If the OAuth application you set up has been suspended (due to reported
210-
abuse, spam, or a mis-use of the API), GitHub will redirect to the
211-
registered callback URL with the following parameters summerizing the
212-
error:
213-
214-
http://your-application.com/callback?error=application_suspended
215-
216-
Please contact [support](https://github.com/contact) to solve issues
217-
with suspended applications.
218-
219-
### Redirect URI mismatch
220-
221-
If you provide a redirect_uri that doesn't match what you've registered
222-
with your application, GitHub will redirect to the registered callback
223-
URL with the following parameters summerizing the error:
224-
225-
http://your-application.com/callback?error=redirect_uri_mismatch
226-
227-
To correct this error, either provide a redirect_uri that matches what
228-
you registered or leave out this parameter to use the default one
229-
registered with your application.
230-
231-
### Access denied
232-
233-
If the user rejects access to your application, GItHub will redirect to
234-
the registered callback URL with the following parameters summerizing
235-
the error:
236-
237-
http://your-application.com/callback?error=access_denied
238-
239-
There's nothing you can do here as users are free to choose not to use
240-
your application. More often that not, users will just close the window
241-
or press back in their browser, so it is likely that you'll never see
242-
this error.
243-
244-
## Common errors for the access token request
245-
246-
In the second phase of exchanging a code for an access token, there are
247-
an additional set of errors that can occur. The format of these
248-
responses is determined by the accept header you pass. The following
249-
examples only show JSON responses.
250-
251-
### Invalid client credentials
252-
253-
If the client\_id and or client\_secret you pass are incorrect you will
254-
receive this error response.
255-
256-
<%= json :error => :invalid_client_credentials %>
257-
258-
To solve this error, go back and make sure you have the correct
259-
credentials for your oauth application. Double check the `client_id` and
260-
`client_secret` to make sure they are correct and being passed correctly
261-
to GitHub.
262-
263-
### Bad verification code
264-
265-
If the verification code you pass is incorrect, expired, or doesn't
266-
match what you received in the first request for authorization you will
267-
receive this error.
268-
269-
<%= json :error => :bad_verification_code %>
270-
=======
271201

272202
There are a few things that can go wrong in the process of obtaining an
273203
OAuth token for a user. In the initial authorization request phase,
@@ -368,8 +298,6 @@ receive this error.
368298
:error_uri => "http://developer.github.com/v3/oauth/#bad-verification-code"
369299
%>
370300

371-
>>>>>>> master
372-
373301
To solve this error, start the [OAuth process over from the beginning](#redirect-users-to-request-github-access)
374302
and get a new code.
375303

content/v3/repos.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Name | Type | Description
113113
`team_id`|`number` | The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
114114
`auto_init`|`boolean` | Pass `true` to create an initial commit with empty README. Default: `false`
115115
`gitignore_template`|`string` | Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". _Ignored if the `auto_init` parameter is not provided._
116+
`license_template`|`string` | Desired [LICENSE template](https://github.com/github/choosealicense.com) to apply. Use the [name of the template](https://github.com/github/choosealicense.com/tree/gh-pages/licenses) without the extension. For example, "mit" or "mozilla". _Ignored if the `auto_init` parameter is not provided._
116117

117118
#### Example
118119

content/webhooks/creating/index.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ you'll set up your server to receive and manage the payload.
2525
To set up a webhook on GitHub, head over to the **Settings** page of your repository,
2626
and click on **Webhooks & services**. After that, click on **Add webhook**.
2727

28-
You'll be presented with a page that lists all the capabilities your webhook
29-
can take advantage of. We'll go through each of these below.
28+
Alternatively, you can choose to build and manage a webhook [through the Webhooks API][webhook-api].
29+
30+
Webhooks require a few configuration options before you can use of them.
31+
We'll go through each of these settings below.
3032

3133
## Payload URL
3234

@@ -54,4 +56,6 @@ When you're finished, click on **Add webhook**. Phew! Now that the webhook is cr
5456
it's time to set up our local server to test the webhook. Head on over to
5557
[Configuring Your Server](/webhooks/configuring/) to learn how to do that.
5658

57-
[hooks-api]: http://developer.github.com/v3/repos/hooks/#events
59+
[webhook-api]: /v3/repos/hooks/
60+
[hooks-api]: /webhooks/#events
61+

lib/resources.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,7 +1567,7 @@ def text_html(response, status, head = {})
15671567
"sha" => "a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d",
15681568
"url" => "https://api.github.com/repos/octocat/example/deployments/1",
15691569
"creator" => USER,
1570-
"payload" => JSON.dump({:environment => 'production'}),
1570+
"payload" => {:environment => 'production'},
15711571
"created_at" => "2012-07-20T01:19:13Z",
15721572
"updated_at" => "2012-07-20T01:19:13Z",
15731573
"description" => "Deploy request from hubot",
@@ -1579,7 +1579,7 @@ def text_html(response, status, head = {})
15791579
"url" => "https://api.github.com/repos/octocat/example/deployments/1/statuses/42",
15801580
"state" => "success",
15811581
"creator" => USER,
1582-
"payload" => JSON.dump({:environment => 'production'}),
1582+
"payload" => {:environment => 'production'},
15831583
"target_url" => "https://gist.github.com/628b2736d379f",
15841584
"created_at" => "2012-07-20T01:19:13Z",
15851585
"updated_at" => "2012-07-20T01:19:13Z",

0 commit comments

Comments
 (0)