Skip to content

Commit fb656f5

Browse files
committed
IDs
1 parent 58c2175 commit fb656f5

19 files changed

Lines changed: 559 additions & 124 deletions

00_core.ipynb

Lines changed: 126 additions & 1 deletion
Large diffs are not rendered by default.

01_actions.ipynb

Lines changed: 56 additions & 1 deletion
Large diffs are not rendered by default.

02_auth.ipynb

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{
44
"cell_type": "code",
55
"execution_count": null,
6+
"id": "fddca449",
67
"metadata": {},
78
"outputs": [],
89
"source": [
@@ -11,6 +12,7 @@
1112
},
1213
{
1314
"cell_type": "markdown",
15+
"id": "36de362c",
1416
"metadata": {},
1517
"source": [
1618
"# Authentication\n",
@@ -20,6 +22,7 @@
2022
{
2123
"cell_type": "code",
2224
"execution_count": null,
25+
"id": "e1ccb974",
2326
"metadata": {},
2427
"outputs": [],
2528
"source": [
@@ -33,6 +36,7 @@
3336
},
3437
{
3538
"cell_type": "markdown",
39+
"id": "a16f7f5c",
3640
"metadata": {},
3741
"source": [
3842
"## Scopes"
@@ -41,6 +45,7 @@
4145
{
4246
"cell_type": "code",
4347
"execution_count": null,
48+
"id": "46620407",
4449
"metadata": {},
4550
"outputs": [],
4651
"source": [
@@ -56,6 +61,7 @@
5661
{
5762
"cell_type": "code",
5863
"execution_count": null,
64+
"id": "0cbc503b",
5965
"metadata": {},
6066
"outputs": [],
6167
"source": [
@@ -66,6 +72,7 @@
6672
{
6773
"cell_type": "code",
6874
"execution_count": null,
75+
"id": "404b7d4f",
6976
"metadata": {},
7077
"outputs": [],
7178
"source": [
@@ -78,6 +85,7 @@
7885
{
7986
"cell_type": "code",
8087
"execution_count": null,
88+
"id": "98c13470",
8189
"metadata": {},
8290
"outputs": [
8391
{
@@ -97,6 +105,7 @@
97105
},
98106
{
99107
"cell_type": "markdown",
108+
"id": "9fb050ab",
100109
"metadata": {},
101110
"source": [
102111
"## GhDeviceAuth -"
@@ -105,6 +114,7 @@
105114
{
106115
"cell_type": "code",
107116
"execution_count": null,
117+
"id": "7b224a0a",
108118
"metadata": {},
109119
"outputs": [],
110120
"source": [
@@ -115,6 +125,7 @@
115125
{
116126
"cell_type": "code",
117127
"execution_count": null,
128+
"id": "2a614e72",
118129
"metadata": {},
119130
"outputs": [],
120131
"source": [
@@ -132,6 +143,7 @@
132143
},
133144
{
134145
"cell_type": "markdown",
146+
"id": "dc8e3d24",
135147
"metadata": {},
136148
"source": [
137149
"Creating a `GhDeviceAuth` will complete the first step in the GitHub API device flow, getting device and user codes."
@@ -140,6 +152,7 @@
140152
{
141153
"cell_type": "code",
142154
"execution_count": null,
155+
"id": "ebd45f6b",
143156
"metadata": {},
144157
"outputs": [
145158
{
@@ -161,6 +174,7 @@
161174
{
162175
"cell_type": "code",
163176
"execution_count": null,
177+
"id": "d3764621",
164178
"metadata": {},
165179
"outputs": [],
166180
"source": [
@@ -174,6 +188,7 @@
174188
},
175189
{
176190
"cell_type": "markdown",
191+
"id": "4002d272",
177192
"metadata": {},
178193
"source": [
179194
"You can provide your own instructions on how to authenticate, or just print this out:"
@@ -182,6 +197,7 @@
182197
{
183198
"cell_type": "code",
184199
"execution_count": null,
200+
"id": "1ca1e759",
185201
"metadata": {},
186202
"outputs": [
187203
{
@@ -200,6 +216,7 @@
200216
{
201217
"cell_type": "code",
202218
"execution_count": null,
219+
"id": "255b299c",
203220
"metadata": {},
204221
"outputs": [],
205222
"source": [
@@ -212,6 +229,7 @@
212229
},
213230
{
214231
"cell_type": "markdown",
232+
"id": "ac45cf53",
215233
"metadata": {},
216234
"source": [
217235
"This uses Python's `webbrowser.open`, which will use the user's default web browser. This won't work well if the user is using a remote terminal."
@@ -220,6 +238,7 @@
220238
{
221239
"cell_type": "code",
222240
"execution_count": null,
241+
"id": "5091b2c8",
223242
"metadata": {},
224243
"outputs": [],
225244
"source": [
@@ -239,6 +258,7 @@
239258
},
240259
{
241260
"cell_type": "markdown",
261+
"id": "50846af0",
242262
"metadata": {},
243263
"source": [
244264
"Until the user has completed authentication in the browser, this will return None. Normally, you won't call this directly, but will call `wait` (see below), which will repeatedly call `auth` until authentication is complete."
@@ -247,6 +267,7 @@
247267
{
248268
"cell_type": "code",
249269
"execution_count": null,
270+
"id": "65f3a46e",
250271
"metadata": {},
251272
"outputs": [
252273
{
@@ -264,6 +285,7 @@
264285
{
265286
"cell_type": "code",
266287
"execution_count": null,
288+
"id": "a7d55794",
267289
"metadata": {},
268290
"outputs": [],
269291
"source": [
@@ -282,6 +304,7 @@
282304
},
283305
{
284306
"cell_type": "markdown",
307+
"id": "24d19c96",
285308
"metadata": {},
286309
"source": [
287310
"If you pass a callback to `cb`, it will be called after each unsuccessful check for user authentication. For instance, to print a `.` to the screen after each poll, and store the token in a variable `token` when complete, you could use:\n",
@@ -294,6 +317,7 @@
294317
{
295318
"cell_type": "code",
296319
"execution_count": null,
320+
"id": "f4617cfc",
297321
"metadata": {},
298322
"outputs": [],
299323
"source": [
@@ -304,6 +328,7 @@
304328
{
305329
"cell_type": "code",
306330
"execution_count": null,
331+
"id": "e329a3d2",
307332
"metadata": {},
308333
"outputs": [],
309334
"source": [
@@ -325,6 +350,7 @@
325350
},
326351
{
327352
"cell_type": "markdown",
353+
"id": "3797f0b0",
328354
"metadata": {},
329355
"source": [
330356
"When we run this we'll be shown a URL to visit and a code to enter in order to authenticate. Normally we'll be prompted to open a browser, and the function will wait for authentication to complete -- for demonstrating here we'll skip both of these steps:"
@@ -333,6 +359,7 @@
333359
{
334360
"cell_type": "code",
335361
"execution_count": null,
362+
"id": "7882bf56",
336363
"metadata": {},
337364
"outputs": [
338365
{
@@ -351,6 +378,7 @@
351378
},
352379
{
353380
"cell_type": "markdown",
381+
"id": "8782bc39",
354382
"metadata": {},
355383
"source": [
356384
"## Export -"
@@ -359,6 +387,7 @@
359387
{
360388
"cell_type": "code",
361389
"execution_count": null,
390+
"id": "ee5b57eb",
362391
"metadata": {},
363392
"outputs": [
364393
{
@@ -388,6 +417,7 @@
388417
{
389418
"cell_type": "code",
390419
"execution_count": null,
420+
"id": "6c9abf58",
391421
"metadata": {},
392422
"outputs": [],
393423
"source": []
@@ -401,5 +431,5 @@
401431
}
402432
},
403433
"nbformat": 4,
404-
"nbformat_minor": 4
434+
"nbformat_minor": 5
405435
}

0 commit comments

Comments
 (0)