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.

Commit6c47da6

Browse files
committed
🙌
1 parent90fe841 commit6c47da6

File tree

69 files changed

+889
-919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+889
-919
lines changed

‎changes.atom

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ $ curl -H "Authorization: token [yours]" https://api.github.com/user/teams
200200
For example, if you are making a POST with the<code>application/json</code>
201201
mime-type you’ll see an additional field for the granted scopes.</p>
202202

203-
<pre><code><span>{</span>
203+
<pre><code><span>{</span>
204204
<span class="s2">"access_token"</span><span class="o">:</span><span class="s2">"e72e16c7e42f292c6912e7710c838347ae178b4a"</span><span class="p">,</span>
205205
<span class="s2">"scope"</span><span class="o">:</span><span class="s2">"repo,gist"</span><span class="p">,</span>
206206
<span class="s2">"token_type"</span><span class="o">:</span><span class="s2">"bearer"</span>

‎changes/2013-10-04-oauth-changes-coming/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ <h2 class="title">
5858
For example, if you are making a POST with the<code>application/json</code>
5959
mime-type you’ll see an additional field for the granted scopes.</p>
6060

61-
<preclass="highlight"><codeclass="language-javascript"><spanclass="p">{</span>
61+
<pre><codeclass="language-javascript"><spanclass="p">{</span>
6262
<spanclass="s2">"access_token"</span><spanclass="o">:</span><spanclass="s2">"e72e16c7e42f292c6912e7710c838347ae178b4a"</span><spanclass="p">,</span>
6363
<spanclass="s2">"scope"</span><spanclass="o">:</span><spanclass="s2">"repo,gist"</span><spanclass="p">,</span>
6464
<spanclass="s2">"token_type"</span><spanclass="o">:</span><spanclass="s2">"bearer"</span>

‎changes/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ <h2 class="title">
274274
For example, if you are making a POST with the<code>application/json</code>
275275
mime-type you’ll see an additional field for the granted scopes.</p>
276276

277-
<preclass="highlight"><codeclass="language-javascript"><spanclass="p">{</span>
277+
<pre><codeclass="language-javascript"><spanclass="p">{</span>
278278
<spanclass="s2">"access_token"</span><spanclass="o">:</span><spanclass="s2">"e72e16c7e42f292c6912e7710c838347ae178b4a"</span><spanclass="p">,</span>
279279
<spanclass="s2">"scope"</span><spanclass="o">:</span><spanclass="s2">"repo,gist"</span><spanclass="p">,</span>
280280
<spanclass="s2">"token_type"</span><spanclass="o">:</span><spanclass="s2">"bearer"</span>

‎guides/basics-of-authentication/index.html

Lines changed: 99 additions & 107 deletions
Large diffs are not rendered by default.

‎guides/getting-started/index.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ <h3 id="hello-world">Hello World</h3>
111111
HTTP spec. Let’s take a look at a few of them:</p>
112112

113113
<ul>
114-
<li><code>X-GitHub-Media-Type</code> has a value of<code>github.beta</code>. This lets us know the<ahref="http://developer.github.com/v3/media/">media type</a>
114+
<li>
115+
<code>X-GitHub-Media-Type</code> has a value of<code>github.beta</code>. This lets us know the<ahref="http://developer.github.com/v3/media/">media type</a>
115116
for the response. Media types have helped us version our output in API v3. We’ll
116117
talk more about that later.</li>
117118
<li>Take note of the<code>X-RateLimit-Limit</code> and<code>X-RateLimit-Remaining</code> headers. This
@@ -177,8 +178,10 @@ <h3 id="oauth">OAuth</h3>
177178
features:</p>
178179

179180
<ul>
180-
<li><strong>Revokable access</strong>: users can revoke authorization to third party apps at any time</li>
181-
<li><strong>Limited access</strong>: users can review the specific access that a token
181+
<li>
182+
<strong>Revokable access</strong>: users can revoke authorization to third party apps at any time</li>
183+
<li>
184+
<strong>Limited access</strong>: users can review the specific access that a token
182185
will provide before authorizing a third party app</li>
183186
</ul>
184187

@@ -187,7 +190,7 @@ <h3 id="oauth">OAuth</h3>
187190
indicating the name of the app, as well as the level of access the app
188191
has once it’s authorized by the user. After a user authorizes access, GitHub
189192
redirects the user back to the application:
190-
<imgsrc="/images/oauth_prompt.png"alt=""/></p>
193+
<imgsrc="/images/oauth_prompt.png"alt=""></p>
191194

192195
<p>You don’t need to set up the entire web flow to begin working with OAuth tokens.
193196
The<ahref="http://developer.github.com/v3/oauth/#oauth-authorizations-api">Authorizations API</a> makes it simple to use Basic Authentication

‎guides/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h1 id="development-guides">Development Guides</h1>
5555

5656
<p>Feel free to fork, clone, and improve these guides.</p>
5757

58-
<p><imgsrc="/images/professorcat.png"alt=""/></p>
58+
<p><imgsrc="/images/professorcat.png"alt=""></p>
5959

6060
</div>
6161

‎guides/rendering-data-as-graphs/index.html

Lines changed: 206 additions & 219 deletions
Large diffs are not rendered by default.

‎guides/working-with-comments/index.html

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,19 @@ <h2 id="pull-request-comments">Pull Request Comments</h2>
7373
<p>The following code should help you get started accessing comments from a Pull Request
7474
using Octokit.rb:</p>
7575

76-
<pre><code>require'octokit'
76+
<pre><codeclass="language-ruby"><spanclass="nb">require</span><spanclass="s1">'octokit'</span>
7777

78-
# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
79-
# Instead, set and test environment variables, like below
80-
client =Octokit::Client.new:access_token =&gt;ENV['MY_PERSONAL_TOKEN']
78+
<spanclass="c1"># !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!</span>
79+
<spanclass="c1"># Instead, set and test environment variables, like below</span>
80+
<spanclass="n">client</span><spanclass="o">=</span><spanclass="no">Octokit</span><spanclass="o">::</span><spanclass="no">Client</span><spanclass="o">.</span><spanclass="n">new</span><spanclass="ss">:access_token</span><spanclass="o">=&gt;</span><spanclass="no">ENV</span><spanclass="o">[</span><spanclass="s1">'MY_PERSONAL_TOKEN'</span><spanclass="o">]</span>
8181

82-
client.issue_comments("octocat/Spoon-Knife",1176).each do |comment|
83-
username =comment[:user][:login]
84-
post_date =comment[:created_at]
85-
content =comment[:body]
82+
<spanclass="n">client</span><spanclass="o">.</span><spanclass="n">issue_comments</span><spanclass="p">(</span><spanclass="s2">"octocat/Spoon-Knife"</span><spanclass="p">,</span><spanclass="mi">1176</span><spanclass="p">)</span><spanclass="o">.</span><spanclass="n">each</span><spanclass="k">do</span><spanclass="o">|</span><spanclass="n">comment</span><spanclass="o">|</span>
83+
<spanclass="n">username</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:user</span><spanclass="o">][</span><spanclass="ss">:login</span><spanclass="o">]</span>
84+
<spanclass="n">post_date</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:created_at</span><spanclass="o">]</span>
85+
<spanclass="n">content</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:body</span><spanclass="o">]</span>
8686

87-
puts "#{username} made a comment on #{post_date}. It says:\n'#{content}'\n"
88-
end
89-
</code></pre>
87+
<spanclass="nb">puts</span><spanclass="s2">"</span><spanclass="si">#{</span><spanclass="n">username</span><spanclass="si">}</span><spanclass="s2"> made a comment on</span><spanclass="si">#{</span><spanclass="n">post_date</span><spanclass="si">}</span><spanclass="s2">. It says:</span><spanclass="se">\n</span><spanclass="s2">'</span><spanclass="si">#{</span><spanclass="n">content</span><spanclass="si">}</span><spanclass="s2">'</span><spanclass="se">\n</span><spanclass="s2">"</span>
88+
<spanclass="k">end</span></code></pre>
9089

9190
<p>Here, we’re specifically calling out to the Issues API to get the comments (<code>issue_comments</code>),
9291
providing both the repository’s name (<code>octocat/Spoon-Knife</code>), and the Pull Request ID
@@ -96,27 +95,26 @@ <h2 id="pull-request-comments">Pull Request Comments</h2>
9695
<h2id="pull-request-comments-on-a-line">Pull Request Comments on a Line</h2>
9796

9897
<p>Within the diff view, you can start a discussion on a particular aspect of a singular
99-
change made within the Pull Request. These comments occur on the individual lines
98+
change made within the Pull Request. These comments occur on the individual lines
10099
within a changed file. The endpoint URL for this discussion comes from<ahref="http://developer.github.com/v3/pulls/comments/">the Pull Request Review API</a>.</p>
101100

102101
<p>The following code fetches all the Pull Request comments made on files, given a single Pull Request number:</p>
103102

104-
<pre><code>require'octokit'
103+
<pre><codeclass="language-ruby"><spanclass="nb">require</span><spanclass="s1">'octokit'</span>
105104

106-
# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
107-
# Instead, set and test environment variables, like below
108-
client =Octokit::Client.new:access_token =&gt;ENV['MY_PERSONAL_TOKEN']
105+
<spanclass="c1"># !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!</span>
106+
<spanclass="c1"># Instead, set and test environment variables, like below</span>
107+
<spanclass="n">client</span><spanclass="o">=</span><spanclass="no">Octokit</span><spanclass="o">::</span><spanclass="no">Client</span><spanclass="o">.</span><spanclass="n">new</span><spanclass="ss">:access_token</span><spanclass="o">=&gt;</span><spanclass="no">ENV</span><spanclass="o">[</span><spanclass="s1">'MY_PERSONAL_TOKEN'</span><spanclass="o">]</span>
109108

110-
client.pull_request_comments("octocat/Spoon-Knife",1176).each do |comment|
111-
username =comment[:user][:login]
112-
post_date =comment[:created_at]
113-
content =comment[:body]
114-
path =comment[:path]
115-
position =comment[:position]
109+
<spanclass="n">client</span><spanclass="o">.</span><spanclass="n">pull_request_comments</span><spanclass="p">(</span><spanclass="s2">"octocat/Spoon-Knife"</span><spanclass="p">,</span><spanclass="mi">1176</span><spanclass="p">)</span><spanclass="o">.</span><spanclass="n">each</span><spanclass="k">do</span><spanclass="o">|</span><spanclass="n">comment</span><spanclass="o">|</span>
110+
<spanclass="n">username</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:user</span><spanclass="o">][</span><spanclass="ss">:login</span><spanclass="o">]</span>
111+
<spanclass="n">post_date</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:created_at</span><spanclass="o">]</span>
112+
<spanclass="n">content</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:body</span><spanclass="o">]</span>
113+
<spanclass="n">path</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:path</span><spanclass="o">]</span>
114+
<spanclass="n">position</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:position</span><spanclass="o">]</span>
116115

117-
puts "#{username} made a comment on #{post_date} for the file called #{path}, on line #{position}. It says:\n'#{content}'\n"
118-
end
119-
</code></pre>
116+
<spanclass="nb">puts</span><spanclass="s2">"</span><spanclass="si">#{</span><spanclass="n">username</span><spanclass="si">}</span><spanclass="s2"> made a comment on</span><spanclass="si">#{</span><spanclass="n">post_date</span><spanclass="si">}</span><spanclass="s2"> for the file called</span><spanclass="si">#{</span><spanclass="n">path</span><spanclass="si">}</span><spanclass="s2">, on line</span><spanclass="si">#{</span><spanclass="n">position</span><spanclass="si">}</span><spanclass="s2">. It says:</span><spanclass="se">\n</span><spanclass="s2">'</span><spanclass="si">#{</span><spanclass="n">content</span><spanclass="si">}</span><spanclass="s2">'</span><spanclass="se">\n</span><spanclass="s2">"</span>
117+
<spanclass="k">end</span></code></pre>
120118

121119
<p>You’ll notice that it’s incredibly similar to the example above. The difference
122120
between this view and the Pull Request comment is the focus of the conversation.
@@ -132,20 +130,19 @@ <h2 id="commit-comments">Commit Comments</h2>
132130
<p>To retrieve the comments on a commit, you’ll want to use the SHA1 of the commit.
133131
In other words, you won’t use any identifier related to the Pull Request. Here’s an example:</p>
134132

135-
<pre><code>require'octokit'
133+
<pre><codeclass="language-ruby"><spanclass="nb">require</span><spanclass="s1">'octokit'</span>
136134

137-
# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
138-
# Instead, set and test environment variables, like below
139-
client =Octokit::Client.new:access_token =&gt;ENV['MY_PERSONAL_TOKEN']
135+
<spanclass="c1"># !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!</span>
136+
<spanclass="c1"># Instead, set and test environment variables, like below</span>
137+
<spanclass="n">client</span><spanclass="o">=</span><spanclass="no">Octokit</span><spanclass="o">::</span><spanclass="no">Client</span><spanclass="o">.</span><spanclass="n">new</span><spanclass="ss">:access_token</span><spanclass="o">=&gt;</span><spanclass="no">ENV</span><spanclass="o">[</span><spanclass="s1">'MY_PERSONAL_TOKEN'</span><spanclass="o">]</span>
140138

141-
client.commit_comments("octocat/Spoon-Knife", "cbc28e7c8caee26febc8c013b0adfb97a4edd96e").each do |comment|
142-
username =comment[:user][:login]
143-
post_date =comment[:created_at]
144-
content =comment[:body]
139+
<spanclass="n">client</span><spanclass="o">.</span><spanclass="n">commit_comments</span><spanclass="p">(</span><spanclass="s2">"octocat/Spoon-Knife"</span><spanclass="p">,</span><spanclass="s2">"cbc28e7c8caee26febc8c013b0adfb97a4edd96e"</span><spanclass="p">)</span><spanclass="o">.</span><spanclass="n">each</span><spanclass="k">do</span><spanclass="o">|</span><spanclass="n">comment</span><spanclass="o">|</span>
140+
<spanclass="n">username</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:user</span><spanclass="o">][</span><spanclass="ss">:login</span><spanclass="o">]</span>
141+
<spanclass="n">post_date</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:created_at</span><spanclass="o">]</span>
142+
<spanclass="n">content</span><spanclass="o">=</span><spanclass="n">comment</span><spanclass="o">[</span><spanclass="ss">:body</span><spanclass="o">]</span>
145143

146-
puts "#{username} made a comment on #{post_date}. It says:\n'#{content}'\n"
147-
end
148-
</code></pre>
144+
<spanclass="nb">puts</span><spanclass="s2">"</span><spanclass="si">#{</span><spanclass="n">username</span><spanclass="si">}</span><spanclass="s2"> made a comment on</span><spanclass="si">#{</span><spanclass="n">post_date</span><spanclass="si">}</span><spanclass="s2">. It says:</span><spanclass="se">\n</span><spanclass="s2">'</span><spanclass="si">#{</span><spanclass="n">content</span><spanclass="si">}</span><spanclass="s2">'</span><spanclass="se">\n</span><spanclass="s2">"</span>
145+
<spanclass="k">end</span></code></pre>
149146

150147
<p>Note that this API call will retrieve single line comments, as well as comments made
151148
on the entire commit.</p>

‎shared/css/documentation.css

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ h1 {
9292
color:#000;
9393
-webkit-font-smoothing: antialiased;
9494
color:#333;
95-
95+
9696
-webkit-transition: opacity0.3s ease-in-out0s;
9797
-moz-transition: opacity0.3s ease-in-out0s;
9898
-ms-transition: opacity0.3s ease-in-out0s;
@@ -241,7 +241,7 @@ a img {
241241

242242
.button:hover {
243243
text-decoration: none;
244-
background-color:#3088d0;
244+
background-color:#3088d0;
245245
}
246246

247247
.button-secondary {
@@ -253,7 +253,7 @@ a img {
253253

254254
.button-secondary:hover {
255255
text-decoration: none;
256-
background-color:#7e909e;
256+
background-color:#7e909e;
257257
}
258258

259259
.rss-subscribe {
@@ -685,7 +685,7 @@ div.sidebar-module ul ul li span {
685685
.api-status {
686686
text-align: center;
687687
padding:20px0;
688-
border-top:1px solid#ddd;
688+
border-top:1px solid#ddd;
689689
font-size:14px;
690690
}
691691

@@ -1062,13 +1062,6 @@ pre.headers + pre {
10621062
margin-top:0;
10631063
}
10641064

1065-
pre.highlight {
1066-
-webkit-border-radius:3px;
1067-
-moz-border-radius:3px;
1068-
border-radius:3px;
1069-
background-color:#FAFAFB;
1070-
}
1071-
10721065
pre.terminal {
10731066
background-color:#444;
10741067
color:#fff;
@@ -1319,7 +1312,7 @@ span.bash-output {
13191312
.sidebar-moduleh3 {
13201313
position: relative;
13211314
}
1322-
1315+
13231316
.sidebar-module .arrow-btn {
13241317
background-image:url(/shared/images/expand-arrows.png);
13251318
background-repeat: no-repeat;
@@ -1383,48 +1376,48 @@ li.api-status img {
13831376
/* Retina support */
13841377
/********************/
13851378

1386-
@mediaonly screenand (-webkit-min-device-pixel-ratio:2),only screenand (min-resolution:192dpi) {
1387-
1379+
@mediaonly screenand (-webkit-min-device-pixel-ratio:2),only screenand (min-resolution:192dpi) {
1380+
13881381
#header-wrapper {
13891382
background-image:url(../images/header@2x.png);
13901383
background-size:8px61px;
13911384
}
1392-
1385+
13931386
#header .logo {
13941387
background-image:url(/images/logo_developer@2x.png);
13951388
background-size:186px27px;
13961389
}
1397-
1390+
13981391
.sidebar-module .arrow-btn {
13991392
background-image:url(/shared/images/expand-arrows@2x.png);
14001393
background-size:73px80px;
14011394
}
1402-
1395+
14031396
.api-status .unknown {
14041397
background-image:url(/images/status-icon-unknown@2x.png);
14051398
background-size:32px32px;
14061399
}
1407-
1400+
14081401
.api-status .good {
14091402
background-image:url(/images/status-icon-good@2x.png);
14101403
background-size:32px32px;
14111404
}
1412-
1405+
14131406
.api-status .minor {
14141407
background-image:url(/images/status-icon-minor@2x.png);
14151408
background-size:32px32px;
14161409
}
1417-
1410+
14181411
.api-status .major {
14191412
background-image:url(/images/status-icon-major@2x.png);
14201413
background-size:32px32px;
14211414
}
1422-
1415+
14231416
.rss-subscribe {
14241417
background-image:url(/images/feed-icon@2x.png);
14251418
background-size:28px28px;
14261419
}
1427-
1420+
14281421
}
14291422

14301423
/* @end */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp