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.

Commitb727cd8

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent6336353 commitb727cd8

24 files changed

+101
-116
lines changed

‎content/v3/gists.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The keys in the `files` object are the `string` filename, and the value is anoth
9090

9191
###Response
9292

93-
<%= headers 201,:Location =>"https://api.github.com/gists/1" %>
93+
<%= headers 201,:Location =>get_resource(:full_gist)['url'] %>
9494
<%= json:full_gist %>
9595

9696
##Edit a gist
@@ -181,7 +181,7 @@ The keys in the `files` object are the `string` filename. The value is another `
181181

182182
###Response
183183

184-
<%= headers 201,:Location =>"https://api.github.com/gists/2" %>
184+
<%= headers 201,:Location =>get_resource(:gist)['url'] %>
185185
<%= json(:gist) %>
186186

187187
##List gist forks

‎content/v3/gists/comments.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ Name | Type | Description
4444

4545
###Response
4646

47-
<%= headers 201,
48-
:Location => "https://api.github.com/gists/comments/1" %>
47+
<%= headers 201,:Location => get_resource(:gist_comment)['url'] %>
4948
<%= json:gist_comment %>
5049

5150
##Edit a comment

‎content/v3/git/blobs.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ read more about the use of media types in the API [here](/v3/media/).
3636

3737
###Response
3838

39-
<%= headers 201,
40-
:Location => "https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" %>
39+
<%= headers 201,:Location => get_resource(:blob_after_create)['url'] %>
4140
<%= json:blob_after_create %>
4241

4342
##Custom media types

‎content/v3/git/commits.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,5 @@ Name | Type | Description
5858

5959
###Response
6060

61-
<%= headers 201,
62-
:Location => "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd" %>
61+
<%= headers 201,:Location => get_resource(:new_commit)['url'] %>
6362
<%= json:new_commit %>

‎content/v3/git/refs.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ Name | Type | Description
5959

6060
###Response
6161

62-
<%= headers 201,\
63-
:Location => "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA" %>
62+
<%= headers 201,:Location => get_resource(:ref)['url'] %>
6463
<%= json:ref %>
6564

6665
##Update a Reference

‎content/v3/git/tags.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,5 @@ Name | Type | Description
6262

6363
###Response
6464

65-
<%= headers 201,
66-
:Location => "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac" %>
65+
<%= headers 201,:Location => get_resource(:gittag)['url'] %>
6766
<%= json:gittag %>

‎content/v3/git/trees.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,5 @@ Name | Type | Description
7777

7878
###Response
7979

80-
<%= headers 201,
81-
:Location => "https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7" %>
80+
<%= headers 201,:Location => get_resource(:tree_new)['url'] %>
8281
<%= json:tree_new %>

‎content/v3/issues.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ Name | Type | Description
108108

109109
###Response
110110

111-
<%= headers 201,
112-
:Location =>
113-
'https://api.github.com/repos/user/repo/issues/1' %>
111+
<%= headers 201,:Location => get_resource(:full_issue)['url'] %>
114112
<%= json:full_issue %>
115113

116114
##Edit an issue

‎content/v3/issues/comments.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,11 @@ Name | Type | Description
6363
`body`|`string` |**Required**. The contents of the comment.
6464

6565

66-
<%= json:body => "a new comment" %>
66+
<%= json:body => "Me too" %>
6767

6868
###Response
6969

70-
<%= headers 201,
71-
:Location =>
72-
"https://api.github.com/repos/user/repo/issues/comments/1" %>
70+
<%= headers 201,:Location => get_resource(:issue_comment)['url'] %>
7371
<%= json:issue_comment %>
7472

7573
##Edit a comment
@@ -83,7 +81,7 @@ Name | Type | Description
8381
`body`|`string` |**Required**. The contents of the comment.
8482

8583

86-
<%= json:body => "String" %>
84+
<%= json:body => "Me too" %>
8785

8886
###Response
8987

‎content/v3/issues/labels.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ Name | Type | Description
3737
`color`|`string` |**Required**. A 6 character hex code, without the leading`#`, identifying the color.
3838

3939

40-
<%= json:name => "API",:color => "FFFFFF" %>
40+
<%= json:name => "bug",:color => "f29513" %>
4141

4242
###Response
4343

44-
<%= headers 201,
45-
:Location =>
46-
"https://api.github.com/repos/user/repo/labels/foo" %>
44+
<%= headers 201,:Location => get_resource(:label)['url'] %>
4745
<%= json:label %>
4846

4947
##Update a label
@@ -58,7 +56,7 @@ Name | Type | Description
5856
`color`|`string` |**Required**. A 6 character hex code, without the leading`#`, identifying the color.
5957

6058

61-
<%= json:name => "API",:color => "FFFFFF" %>
59+
<%= json:name => "bug",:color => "f29513" %>
6260

6361
###Response
6462

‎content/v3/issues/milestones.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ title: Issue Milestones | GitHub API
1313

1414
###Parameters
1515

16-
Name | Type | Description
16+
Name | Type | Description
1717
-----|------|--------------
1818
`state`|`string` | The state of the milestone. Either`open`,`closed`, or`all`. Default:`open`
1919
`sort`|`string` | What to sort results by. Either`due_date` or`completeness`. Default:`due_date`
@@ -40,7 +40,7 @@ Name | Type | Description
4040

4141
###Input
4242

43-
Name | Type | Description
43+
Name | Type | Description
4444
-----|------|---------------
4545
`title`|`string` |**Required**. The title of the milestone.
4646
`state`|`string` | The state of the milestone. Either`open` or`closed`. Default:`open`
@@ -50,17 +50,15 @@ Name | Type | Description
5050
####Example
5151

5252
<%= json\
53-
:title => "String",
54-
:state => "open or closed",
55-
:description => "String",
53+
:title => "v1.0",
54+
:state => "open",
55+
:description => "Tracking milestone for version 1.0",
5656
:due_on => "2012-10-09T23:39:01Z"
5757
%>
5858

5959
###Response
6060

61-
<%= headers 201,
62-
:Location =>
63-
"https://api.github.com/repos/user/repo/milestones/1" %>
61+
<%= headers 201,:Location => get_resource(:milestone)['url'] %>
6462
<%= json:milestone %>
6563

6664
##Update a milestone
@@ -69,7 +67,7 @@ Name | Type | Description
6967

7068
###Input
7169

72-
Name | Type | Description
70+
Name | Type | Description
7371
-----|------|---------------
7472
`title`|`string` | The title of the milestone.
7573
`state`|`string` | The state of the milestone. Either`open` or`closed`. Default:`open`
@@ -79,10 +77,10 @@ Name | Type | Description
7977
####Example
8078

8179
<%= json\
82-
:title => "String",
83-
:state => "open or closed",
84-
:description => "String",
85-
:due_on => "Time"
80+
:title => "v1.0",
81+
:state => "open",
82+
:description => "Tracking milestone for version 1.0",
83+
:due_on => "2012-10-09T23:39:01Z"
8684
%>
8785

8886
###Response
@@ -97,4 +95,3 @@ Name | Type | Description
9795
###Response
9896

9997
<%= headers 204 %>
100-

‎content/v3/oauth_authorizations.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ Name | Type | Description
9494

9595
###Response
9696

97-
<%= headers 201,:Location => "https://api.github.com/authorizations/1"
98-
%>
97+
<%= headers 201,:Location => get_resource(:oauth_access)['url'] %>
9998
<%= json(:oauth_access) { |h| h.merge("fingerprint" => "") } %>
10099

101100
##Get-or-create an authorization for a specific app
@@ -123,14 +122,12 @@ Name | Type | Description
123122

124123
###Response if returning a new token
125124

126-
<%= headers 201,:Location => "https://api.github.com/authorizations/1"
127-
%>
125+
<%= headers 201,:Location => get_resource(:oauth_access)['url'] %>
128126
<%= json(:oauth_access) { |h| h.merge("fingerprint" => "") } %>
129127

130128
###Response if returning an existing token
131129

132-
<%= headers 200,:Location => "https://api.github.com/authorizations/1"
133-
%>
130+
<%= headers 200,:Location => get_resource(:oauth_access)['url'] %>
134131
<%= json(:oauth_access) { |h| h.merge("token" => "", "fingerprint" => "") } %>
135132

136133
##Get-or-create an authorization for a specific app and fingerprint
@@ -161,14 +158,12 @@ Name | Type | Description
161158

162159
###Response if returning a new token
163160

164-
<%= headers 201,:Location => "https://api.github.com/authorizations/1"
165-
%>
161+
<%= headers 201,:Location => get_resource(:oauth_access)['url'] %>
166162
<%= json:oauth_access %>
167163

168164
###Response if returning an existing token
169165

170-
<%= headers 200,:Location => "https://api.github.com/authorizations/1"
171-
%>
166+
<%= headers 200,:Location => get_resource(:oauth_access)['url'] %>
172167
<%= json(:oauth_access) { |h| h.merge("token" => "") } %>
173168

174169
##Update an existing authorization

‎content/v3/orgs/hooks.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ Here's how you can create a hook that posts payloads in JSON format:
8686

8787
###Response
8888

89-
<%= headers 201,
90-
:Location => 'https://api.github.com/orgs/octocat/hooks/1' %>
89+
<%= headers 201,:Location => get_resource(:org_hook)['url'] %>
9190
<%= json:org_hook %>
9291

9392

‎content/v3/pulls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Name | Type | Description
115115

116116
###Response
117117

118-
<%= headers 201,:Location =>"https://api.github.com/user/repo/pulls/1" %>
118+
<%= headers 201,:Location =>get_resource(:pull)['url'] %>
119119
<%= json:pull %>
120120

121121
##Update a pull request

‎content/v3/pulls/comments.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ Name | Type | Description
9797

9898
###Response
9999

100-
<%= headers 201,
101-
:Location =>
102-
"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1" %>
100+
<%= headers 201,:Location => get_resource(:pull_comment)['url'] %>
103101
<%= json:pull_comment %>
104102

105103
##Edit a comment

‎content/v3/repos.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,7 @@ Name | Type | Description
147147

148148
###Response
149149

150-
<%= headers 201,
151-
:Location =>
152-
'https://api.github.com/repos/octocat/Hello-World' %>
150+
<%= headers 201,:Location => get_resource(:repo)['url'] %>
153151
<%= json:repo %>
154152

155153
##Get

‎content/v3/repos/comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Name | Type | Description
5555

5656
###Response
5757

58-
<%= headers 201,:Location =>"https://api.github.com/user/repo/comments/1" %>
58+
<%= headers 201,:Location =>get_resource(:commit_comment)['url'] %>
5959
<%= json:commit_comment %>
6060

6161
##Get a single commit comment

‎content/v3/repos/deployments.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ chat networks.
151151
:description => "Deploying my sweet branch"
152152
%>
153153

154-
<%= headers 201,
155-
:Location =>
156-
'https://api.github.com/repos/octocat/example/deployments/1' %>
154+
<%= headers 201,:Location => get_resource(:deployment)['url'] %>
157155
<%= json:deployment %>
158156

159157
####Advanced Example
@@ -168,9 +166,7 @@ A more advanced example specifying required commit statuses and bypassing auto-m
168166
:required_contexts =>["ci/janky", "security/brakeman"]
169167
%>
170168

171-
<%= headers 201,
172-
:Location =>
173-
'https://api.github.com/repos/octocat/example/deployments/2' %>
169+
<%= headers 201,:Location => get_resource(:deployment)['url'] %>
174170
<%= json:deployment %>
175171

176172
##Update a Deployment
@@ -222,7 +218,5 @@ Name | Type | Description
222218

223219
###Response
224220

225-
<%= headers 201,
226-
:Location =>
227-
'https://api.github.com/repos/octocat/example/deployments/42/statuses/1' %>
221+
<%= headers 201,:Location => get_resource(:deployment_status)['url'] %>
228222
<%= json:deployment_status %>

‎content/v3/repos/hooks.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ Here's how you can create a hook that posts payloads in JSON format:
7070

7171
###Response
7272

73-
<%= headers 201,
74-
:Location => 'https://api.github.com/repos/user/repo/hooks/1' %>
73+
<%= headers 201,:Location => get_resource(:hook)['url'] %>
7574
<%= json:hook %>
7675

7776
##Edit a hook

‎content/v3/repos/keys.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ title: Deploy Keys | GitHub API
1414
###Response
1515

1616
<%= headers 200,:pagination => default_pagination_rels %>
17-
<%= json(:public_key) { |h|[h] } %>
17+
<%= json(:deploy_key) { |h|[h] } %>
1818

1919
##Get a deploy key {#get}
2020

@@ -23,7 +23,7 @@ title: Deploy Keys | GitHub API
2323
###Response
2424

2525
<%= headers 200 %>
26-
<%= json:public_key %>
26+
<%= json:deploy_key %>
2727

2828
##Add a new deploy key {#create}
2929

@@ -35,8 +35,8 @@ title: Deploy Keys | GitHub API
3535

3636
###Response
3737

38-
<%= headers 201,:Location =>"https://api.github.com/user/repo/keys/1" %>
39-
<%= json:public_key %>
38+
<%= headers 201,:Location =>get_resource(:deploy_key)['url'] %>
39+
<%= json:deploy_key %>
4040

4141
##Edit a deploy key {#edit}
4242

‎content/v3/repos/releases.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ Name | Type | Description
7171

7272
###Response
7373

74-
<%= headers 201,
75-
:Location => 'https://api.github.com/repos/octocat/Hello-World/releases/1' %>
74+
<%= headers 201,:Location => get_resource(:created_release)['url'] %>
7675
<%= json(:created_release) %>
7776

7877
##Edit a release

‎content/v3/repos/statuses.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ Name | Type | Description
6060

6161
###Response
6262

63-
<%= headers 201,
64-
:Location =>
65-
'https://api.github.com/repos/octocat/example/statuses/1' %>
63+
<%= headers 201,:Location => get_resource(:status)['url'] %>
6664
<%= json:status %>
6765

6866
##List Statuses for a specific Ref

‎content/v3/users/keys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ If your GitHub Enterprise appliance has [LDAP Sync enabled](https://help.github.
6868

6969
###Response
7070

71-
<%= headers 201,:Location =>"https://api.github.com/user/keys/1" %>
71+
<%= headers 201,:Location =>get_resource(:public_key)['url'] %>
7272
<%= json:public_key %>
7373

7474
##Update a public key

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp