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.

Commit4ba2483

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents0956cf7 +7f858bd commit4ba2483

File tree

16 files changed

+49
-45
lines changed

16 files changed

+49
-45
lines changed

‎Rakefile‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ def commit_message
2424
':sailboat:',':gift:',':ship:',':shipit:',':sparkles:',':rainbow:']
2525
default_message="P U B L I S H#{publish_emojis.sample}"
2626

27-
print"Enter a commit message (default: '#{default_message}'): "
28-
STDOUT.flush
29-
mesg=STDIN.gets.chomp.strip
27+
unlessENV["no_commit_msg"]
28+
print"Enter a commit message (default: '#{default_message}'): "
29+
STDOUT.flush
30+
mesg=STDIN.gets.chomp.strip
31+
end
3032

31-
mesg=default_messageifmesg ==''
33+
mesg=default_messageifmesg.nil? ||mesg ==''
3234
mesg.gsub(/'/,'')# Allow this to be handed off via -m '#{message}'
3335
end
3436

‎content/guides/getting-started.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ X-GitHub-OTP: required; :2fa-type
131131

132132
{
133133
"message": "Must specify two-factor authentication OTP code.",
134-
"documentation_url": "http://developer.github.com/v3/auth#working-with-two-factor-authentication"
134+
"documentation_url": "https://developer.github.com/v3/auth#working-with-two-factor-authentication"
135135
}
136136
</pre>
137137

@@ -211,7 +211,7 @@ Content-Length: 384
211211
"updated_at": "2012-11-14T14:04:24Z",
212212
"url": "https://api.github.com/authorizations/2",
213213
"app": {
214-
"url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api",
214+
"url": "https://developer.github.com/v3/oauth/#oauth-authorizations-api",
215215
"name": "GitHub API"
216216
},
217217
"created_at": "2012-11-14T14:04:24Z",

‎content/guides/rendering-data-as-graphs.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ arguments to `drawTreemap` above, to get all the information to show up properly
353353
[Octokit]:https://github.com/pengwynn/octokit
354354
[D3 mortals]:http://www.recursion.org/d3-for-mere-mortals/
355355
[D3 treemap]:http://bl.ocks.org/mbostock/4063582
356-
[language API]:http://developer.github.com/v3/repos/#list-languages
356+
[language API]:https://developer.github.com/v3/repos/#list-languages
357357
[simple tree map]:http://2kittymafiasoftware.blogspot.com/2011/09/simple-treemap-visualization-with-d3.html
358358
[platform samples]:https://github.com/github/platform-samples/tree/master/api/ruby/rendering-data-as-graphs
359359
[new oauth application]:https://github.com/settings/applications/new

‎content/guides/traversing-with-pagination.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ Most of the time, you might even find that you're asking for _too much_ informat
1212
and in order to keep our servers happy, the API will automatically[paginate the requested items][pagination].
1313

1414
In this guide, we'll make some calls to the GitHub Search API, and iterate over
15-
the results using pagination. You can find the complete source code for this project
16-
in the[platform-samples][platform samples] repository.
15+
the results using pagination. You can find the complete source code for this project
16+
in the[platform-samples][platform samples] repository.
1717

1818
##Basics of Pagination
1919

2020
To start with, it's important to know a few facts about receiving paginated items:
2121

2222
1. Different API calls respond with different defaults. For example, a call to
23-
[list GitHub's public repositories](http://developer.github.com/v3/repos/#list-all-public-repositories)
23+
[list GitHub's public repositories](https://developer.github.com/v3/repos/#list-all-public-repositories)
2424
provides paginated items in sets of 30, whereas a call to the GitHub Search API
2525
provides items in sets of 100
2626
2. You can specify how many items to receive (up to a maximum of 100); but,
27-
3. For technical reasons, not every endpoint behaves the same. For example,
28-
[events](http://developer.github.com/v3/activity/events/) won't let you set a maximum for items to receive.
27+
3. For technical reasons, not every endpoint behaves the same. For example,
28+
[events](https://developer.github.com/v3/activity/events/) won't let you set a maximum for items to receive.
2929
Be sure to read the documentation on how to handle paginated results for specific endpoints.
3030

3131
Information about pagination is provided in[the Link header](http://tools.ietf.org/html/rfc5988)
@@ -50,7 +50,7 @@ Nice!
5050
Keep in mind that you should**always** rely on these link relations provided
5151
to you. Don't try to guess or construct your own URL. Some API calls, like[listing
5252
commits on a repository][listing commits], use pagination results that are based
53-
on SHA values, not numbers.
53+
on SHA values, not numbers.
5454

5555
###Navigating through the pages
5656

@@ -106,7 +106,7 @@ pass in our [personal access token][personal token]:
106106
# Instead, set and test environment variables, like below
107107
client = Octokit::Client.new :access_token => ENV['MY_PERSONAL_TOKEN']
108108

109-
Next, we'll execute the search, using Octokit's`search_code` method. Unlike
109+
Next, we'll execute the search, using Octokit's`search_code` method. Unlike
110110
using`curl`, we can also immediately retrieve the number of results, so let's
111111
do that:
112112

@@ -133,7 +133,7 @@ this information to the user:
133133
puts "There are #{total_count} results, on #{number_of_pages} pages!"
134134

135135
Finally, let's iterate through the results. You could do this with a loop`for i in 1..number_of_pages.to_i`,
136-
but instead, let's follow the`rels[:next]` headers to retrieve information from
136+
but instead, let's follow the`rels[:next]` headers to retrieve information from
137137
each page. For the sake of simplicity, let's just grab the file path of the first
138138
result from each page. To do this, we'll need a loop; and at the end of every loop,
139139
we'll retrieve the data set for the next page by following the`rels[:next]` information.
@@ -179,14 +179,14 @@ your code should remain intact:
179179

180180
##Constructing Pagination Links
181181

182-
Normally, with pagination, your goal isn't to concatenate all of the possible
182+
Normally, with pagination, your goal isn't to concatenate all of the possible
183183
results, but rather, to produce a set of navigation, like this:
184184

185185
![Sample of pagination links](/images/pagination_sample.png)
186186

187187
Let's sketch out a micro-version of what that might entail.
188188

189-
From the code above, we already know we can get the`number_of_pages` in the
189+
From the code above, we already know we can get the`number_of_pages` in the
190190
paginated results from the first call:
191191

192192
#!ruby
@@ -230,13 +230,13 @@ individual page, by passing the `:page` option:
230230
#!ruby
231231
clicked_results = client.search_code('addClass user:mozilla', :page => random_page)
232232

233-
If we wanted to get fancy, we could also grab the previous and next pages, in
233+
If we wanted to get fancy, we could also grab the previous and next pages, in
234234
order to generate links for back (`<<`) and foward (`>>`) elements:
235235

236236
#!ruby
237237
prev_page_href = client.last_response.rels[:prev] ? client.last_response.rels[:prev].href : "(none)"
238238
next_page_href = client.last_response.rels[:next] ? client.last_response.rels[:next].href : "(none)"
239-
239+
240240
puts "The prev page link is #{prev_page_href}"
241241
puts "The next page link is #{next_page_href}"
242242

@@ -245,4 +245,4 @@ order to generate links for back (`<<`) and foward (`>>`) elements:
245245
[octokit.rb]:https://github.com/octokit/octokit.rb
246246
[personal token]:https://help.github.com/articles/creating-an-access-token-for-command-line-use
247247
[hypermedia-relations]:https://github.com/octokit/octokit.rb#pagination
248-
[listing commits]:http://developer.github.com/v3/repos/commits/#list-commits-on-a-repository
248+
[listing commits]:https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository

‎content/guides/working-with-comments.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ on the entire commit.
111111
[commit comment]:https://github.com/octocat/Spoon-Knife/commit/cbc28e7c8caee26febc8c013b0adfb97a4edd96e#commitcomment-4049848
112112
[sample PR]:https://github.com/octocat/Spoon-Knife/pull/1176
113113
[platform-samples]:https://github.com/github/platform-samples/tree/master/api/ruby/working-with-comments
114-
[issues]:http://developer.github.com/v3/issues/comments/
114+
[issues]:https://developer.github.com/v3/issues/comments/
115115
[personal token]:https://help.github.com/articles/creating-an-access-token-for-command-line-use
116116
[octokit.rb]:https://github.com/octokit/octokit.rb
117-
[PR Review API]:http://developer.github.com/v3/pulls/comments/
118-
[commit comment API]:http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment
117+
[PR Review API]:https://developer.github.com/v3/pulls/comments/
118+
[commit comment API]:https://developer.github.com/v3/repos/comments/#get-a-single-commit-comment

‎content/v3.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ HTTP/1.1 401 Unauthorized
237237

238238
{
239239
"message": "Bad credentials",
240-
"documentation_url": "http://developer.github.com/v3"
240+
"documentation_url": "https://developer.github.com/v3"
241241
}
242242
</pre>
243243

@@ -252,7 +252,7 @@ HTTP/1.1 403 Forbidden
252252

253253
{
254254
"message": "Maximum number of login attempts exceeded. Please try again later.",
255-
"documentation_url": "http://developer.github.com/v3"
255+
"documentation_url": "https://developer.github.com/v3"
256256
}
257257
</pre>
258258

@@ -286,7 +286,7 @@ Requests that return multiple items will be paginated to 30 items by
286286
default. You can specify further pages with the`?page` parameter. For some
287287
resources, you can also set a custom page size up to 100 with the`?per_page` parameter.
288288
Note that for technical reasons not all endpoints respect the`?per_page` parameter,
289-
see[events](http://developer.github.com/v3/activity/events/) for example.
289+
see[events](https://developer.github.com/v3/activity/events/) for example.
290290

291291
<preclass="terminal">
292292
$ curl 'https://api.github.com/user/repos?page=2&per_page=100'
@@ -367,7 +367,7 @@ X-RateLimit-Remaining: 0
367367
X-RateLimit-Reset: 1377013266
368368

369369
{
370-
"message": "API rate limit exceeded. Seehttp://developer.github.com/v3/#rate-limiting for details."
370+
"message": "API rate limit exceeded. Seehttps://developer.github.com/v3/#rate-limiting for details."
371371
}
372372
</pre>
373373

@@ -583,7 +583,7 @@ For API calls that allow for a timestamp to be specified, we use that exact
583583
timestamp. An example of this is the[Commits API](/v3/git/commits).
584584

585585
These timestamps look something like`2014-02-27T15:05:06+01:00`. Also see
586-
[this example](http://developer.github.com/v3/git/commits/#example-input) for
586+
[this example](https://developer.github.com/v3/git/commits/#example-input) for
587587
how these timestamps can be specified.
588588

589589
####Using the`Time-Zone` header

‎content/v3/activity/events.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ All Events have the same response format:
4747
##List issue events for a repository
4848

4949
Repository issue events have a different format than other events,
50-
as documented in the[Issue Events API](http://developer.github.com/v3/issues/events/).
50+
as documented in the[Issue Events API](https://developer.github.com/v3/issues/events/).
5151

5252
GET /repos/:owner/:repo/issues/events
5353

‎content/v3/activity/events/types.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ Triggered on push to a GitHub Pages enabled branch (`gh-pages` for project pages
278278

279279
Key | Type | Description
280280
----|------|------------
281-
`build` |`object` | The[page build](http://developer.github.com/v3/repos/pages/#list-pages-builds) itself.
281+
`build` |`object` | The[page build](https://developer.github.com/v3/repos/pages/#list-pages-builds) itself.
282282

283283

284284
##PublicEvent

‎content/v3/activity/feeds.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ tokens.
3232

3333
[Atom]:http://en.wikipedia.org/wiki/Atom_(standard)
3434
[authenticating]:/v3/#basic-authentication
35-
[URI template]:http://developer.github.com/v3/#hypermedia
35+
[URI template]:https://developer.github.com/v3/#hypermedia

‎content/v3/meta.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Or, if you access this endpoint on your organization's [GitHub Enterprise](https
1818

1919
Name | Type | Description
2020
-----|------|--------------
21-
`hooks`|`array` of`strings` | An Array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from on GitHub.com. Subscribe to the[API Changes blog](http://developer.github.com/changes/) or follow[@GitHubAPI](https://twitter.com/GitHubAPI) on Twitter to get updated when this list changes.
21+
`hooks`|`array` of`strings` | An Array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from on GitHub.com. Subscribe to the[API Changes blog](https://developer.github.com/changes/) or follow[@GitHubAPI](https://twitter.com/GitHubAPI) on Twitter to get updated when this list changes.
2222
`git`|`array` of`strings` | An Array of IP addresses in CIDR format specifying the Git servers for GitHub.com.
2323
`verifiable_password_authentication`|`boolean` | Whether authentication with username and password is supported. (GitHub Enterprise instances using CAS or OAuth for authentication will return`false`. Features like[Basic Authentication with a username and password](/v3/auth/#via-username-and-password),[sudo mode](https://help.github.com/articles/sudo-mode), and[two-factor authentication](https://help.github.com/articles/about-two-factor-authentication) are not supported on these servers.)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp