gitabu 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +33 -0
  4. data/CHANGELOG.md +3 -0
  5. data/Gemfile +10 -0
  6. data/Gemfile.lock +65 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +42 -0
  9. data/Rakefile +12 -0
  10. data/gitabu.gemspec +41 -0
  11. data/lib/gitabu/api/v3/actions.rb +3724 -0
  12. data/lib/gitabu/api/v3/activity.rb +835 -0
  13. data/lib/gitabu/api/v3/apps.rb +961 -0
  14. data/lib/gitabu/api/v3/billing.rb +217 -0
  15. data/lib/gitabu/api/v3/branches.rb +1098 -0
  16. data/lib/gitabu/api/v3/checks.rb +384 -0
  17. data/lib/gitabu/api/v3/code_scanning.rb +315 -0
  18. data/lib/gitabu/api/v3/codes_of_conduct.rb +92 -0
  19. data/lib/gitabu/api/v3/codespaces.rb +650 -0
  20. data/lib/gitabu/api/v3/collaborators.rb +341 -0
  21. data/lib/gitabu/api/v3/commits.rb +428 -0
  22. data/lib/gitabu/api/v3/dependabot.rb +419 -0
  23. data/lib/gitabu/api/v3/deploy_keys.rb +152 -0
  24. data/lib/gitabu/api/v3/deployments.rb +356 -0
  25. data/lib/gitabu/api/v3/emojis.rb +67 -0
  26. data/lib/gitabu/api/v3/enterprise_admin.rb +495 -0
  27. data/lib/gitabu/api/v3/gists.rb +552 -0
  28. data/lib/gitabu/api/v3/git.rb +409 -0
  29. data/lib/gitabu/api/v3/gitignore.rb +92 -0
  30. data/lib/gitabu/api/v3/interactions.rb +275 -0
  31. data/lib/gitabu/api/v3/issues.rb +1119 -0
  32. data/lib/gitabu/api/v3/licenses.rb +118 -0
  33. data/lib/gitabu/api/v3/markdown.rb +94 -0
  34. data/lib/gitabu/api/v3/meta.rb +142 -0
  35. data/lib/gitabu/api/v3/metrics.rb +302 -0
  36. data/lib/gitabu/api/v3/migrations.rb +631 -0
  37. data/lib/gitabu/api/v3/orgs.rb +1291 -0
  38. data/lib/gitabu/api/v3/packages.rb +686 -0
  39. data/lib/gitabu/api/v3/pages.rb +282 -0
  40. data/lib/gitabu/api/v3/projects.rb +693 -0
  41. data/lib/gitabu/api/v3/pulls.rb +816 -0
  42. data/lib/gitabu/api/v3/rate_limit.rb +67 -0
  43. data/lib/gitabu/api/v3/reactions.rb +734 -0
  44. data/lib/gitabu/api/v3/releases.rb +411 -0
  45. data/lib/gitabu/api/v3/repos.rb +1136 -0
  46. data/lib/gitabu/api/v3/scim.rb +214 -0
  47. data/lib/gitabu/api/v3/search.rb +217 -0
  48. data/lib/gitabu/api/v3/secret_scanning.rb +201 -0
  49. data/lib/gitabu/api/v3/teams.rb +1963 -0
  50. data/lib/gitabu/api/v3/users.rb +851 -0
  51. data/lib/gitabu/api/v3/webhooks.rb +379 -0
  52. data/lib/gitabu/builder.rb +37 -0
  53. data/lib/gitabu/client.rb +8 -0
  54. data/lib/gitabu/generator.rb +75 -0
  55. data/lib/gitabu/http_client.rb +96 -0
  56. data/lib/gitabu/items.rb +110 -0
  57. data/lib/gitabu/public/api/v3/actions.json +5779 -0
  58. data/lib/gitabu/public/api/v3/activity.json +1248 -0
  59. data/lib/gitabu/public/api/v3/apps.json +1174 -0
  60. data/lib/gitabu/public/api/v3/billing.json +183 -0
  61. data/lib/gitabu/public/api/v3/branches.json +1886 -0
  62. data/lib/gitabu/public/api/v3/checks.json +856 -0
  63. data/lib/gitabu/public/api/v3/code_scanning.json +666 -0
  64. data/lib/gitabu/public/api/v3/codes_of_conduct.json +41 -0
  65. data/lib/gitabu/public/api/v3/codespaces.json +884 -0
  66. data/lib/gitabu/public/api/v3/collaborators.json +464 -0
  67. data/lib/gitabu/public/api/v3/commits.json +830 -0
  68. data/lib/gitabu/public/api/v3/dependabot.json +596 -0
  69. data/lib/gitabu/public/api/v3/deploy_keys.json +195 -0
  70. data/lib/gitabu/public/api/v3/deployments.json +698 -0
  71. data/lib/gitabu/public/api/v3/emojis.json +18 -0
  72. data/lib/gitabu/public/api/v3/enterprise_admin.json +881 -0
  73. data/lib/gitabu/public/api/v3/gists.json +689 -0
  74. data/lib/gitabu/public/api/v3/git.json +735 -0
  75. data/lib/gitabu/public/api/v3/gitignore.json +41 -0
  76. data/lib/gitabu/public/api/v3/interactions.json +265 -0
  77. data/lib/gitabu/public/api/v3/issues.json +2359 -0
  78. data/lib/gitabu/public/api/v3/licenses.json +100 -0
  79. data/lib/gitabu/public/api/v3/markdown.json +59 -0
  80. data/lib/gitabu/public/api/v3/meta.json +69 -0
  81. data/lib/gitabu/public/api/v3/metrics.json +342 -0
  82. data/lib/gitabu/public/api/v3/migrations.json +960 -0
  83. data/lib/gitabu/public/api/v3/orgs.json +1989 -0
  84. data/lib/gitabu/public/api/v3/packages.json +1078 -0
  85. data/lib/gitabu/public/api/v3/pages.json +373 -0
  86. data/lib/gitabu/public/api/v3/projects.json +966 -0
  87. data/lib/gitabu/public/api/v3/pulls.json +1768 -0
  88. data/lib/gitabu/public/api/v3/rate_limit.json +18 -0
  89. data/lib/gitabu/public/api/v3/reactions.json +1425 -0
  90. data/lib/gitabu/public/api/v3/releases.json +753 -0
  91. data/lib/gitabu/public/api/v3/repos.json +2314 -0
  92. data/lib/gitabu/public/api/v3/scim.json +412 -0
  93. data/lib/gitabu/public/api/v3/search.json +408 -0
  94. data/lib/gitabu/public/api/v3/secret_scanning.json +385 -0
  95. data/lib/gitabu/public/api/v3/teams.json +3126 -0
  96. data/lib/gitabu/public/api/v3/users.json +956 -0
  97. data/lib/gitabu/public/api/v3/webhooks.json +667 -0
  98. data/lib/gitabu/run.rb +237 -0
  99. data/lib/gitabu/scraper.rb +86 -0
  100. data/lib/gitabu/templates/template.rb.erb +70 -0
  101. data/lib/gitabu/version.rb +6 -0
  102. data/lib/gitabu.rb +57 -0
  103. data/sig/gitabu.rbs +4 -0
  104. metadata +177 -0
@@ -0,0 +1,884 @@
1
+ {
2
+ "result": [
3
+ {
4
+ "namespace_description": "List codespaces in a repository for the authenticated user",
5
+ "method": "get",
6
+ "endpoint": "/repos/{owner}/{repo}/codespaces",
7
+ "field_0": {
8
+ "field_type": "header",
9
+ "fields": {
10
+ "name": "accept",
11
+ "type": "string",
12
+ "in": "header",
13
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
14
+ }
15
+ },
16
+ "field_1": {
17
+ "field_type": "query",
18
+ "fields": {
19
+ "name": "per_page",
20
+ "type": "integer",
21
+ "in": "query",
22
+ "description": "Results per page (max 100)Default: 30"
23
+ }
24
+ },
25
+ "field_2": {
26
+ "field_type": "query",
27
+ "fields": {
28
+ "name": "page",
29
+ "type": "integer",
30
+ "in": "query",
31
+ "description": "Page number of the results to fetch.Default: 1"
32
+ }
33
+ },
34
+ "field_3": {
35
+ "field_type": "path",
36
+ "fields": {
37
+ "name": "owner",
38
+ "type": "string",
39
+ "in": "path",
40
+ "description": ""
41
+ }
42
+ },
43
+ "field_4": {
44
+ "field_type": "path",
45
+ "fields": {
46
+ "name": "repo",
47
+ "type": "string",
48
+ "in": "path",
49
+ "description": ""
50
+ }
51
+ }
52
+ },
53
+ {
54
+ "namespace_description": "Create a codespace in a repository",
55
+ "method": "post",
56
+ "endpoint": "/repos/{owner}/{repo}/codespaces",
57
+ "field_0": {
58
+ "field_type": "header",
59
+ "fields": {
60
+ "name": "accept",
61
+ "type": "string",
62
+ "in": "header",
63
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
64
+ }
65
+ },
66
+ "field_1": {
67
+ "field_type": "path",
68
+ "fields": {
69
+ "name": "owner",
70
+ "type": "string",
71
+ "in": "path",
72
+ "description": ""
73
+ }
74
+ },
75
+ "field_2": {
76
+ "field_type": "path",
77
+ "fields": {
78
+ "name": "repo",
79
+ "type": "string",
80
+ "in": "path",
81
+ "description": ""
82
+ }
83
+ },
84
+ "field_3": {
85
+ "field_type": "body",
86
+ "fields": {
87
+ "name": "ref",
88
+ "type": "string",
89
+ "in": "body",
90
+ "description": "Git ref (typically a branch name) for this codespace"
91
+ }
92
+ },
93
+ "field_4": {
94
+ "field_type": "body",
95
+ "fields": {
96
+ "name": "location",
97
+ "type": "string",
98
+ "in": "body",
99
+ "description": "Location for this codespace. Assigned by IP if not provided"
100
+ }
101
+ },
102
+ "field_5": {
103
+ "field_type": "body",
104
+ "fields": {
105
+ "name": "machine",
106
+ "type": "string",
107
+ "in": "body",
108
+ "description": "Machine type to use for this codespace"
109
+ }
110
+ },
111
+ "field_6": {
112
+ "field_type": "body",
113
+ "fields": {
114
+ "name": "working_directory",
115
+ "type": "string",
116
+ "in": "body",
117
+ "description": "Working directory for this codespace"
118
+ }
119
+ },
120
+ "field_7": {
121
+ "field_type": "body",
122
+ "fields": {
123
+ "name": "idle_timeout_minutes",
124
+ "type": "integer",
125
+ "in": "body",
126
+ "description": "Time in minutes before codespace stops from inactivity"
127
+ }
128
+ },
129
+ "field_8": {
130
+ "field_type": "body",
131
+ "fields": {
132
+ "name": "display_name",
133
+ "type": "string",
134
+ "in": "body",
135
+ "description": "Display name for this codespace"
136
+ }
137
+ }
138
+ },
139
+ {
140
+ "namespace_description": "Create a codespace from a pull request",
141
+ "method": "post",
142
+ "endpoint": "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces",
143
+ "field_0": {
144
+ "field_type": "header",
145
+ "fields": {
146
+ "name": "accept",
147
+ "type": "string",
148
+ "in": "header",
149
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
150
+ }
151
+ },
152
+ "field_1": {
153
+ "field_type": "path",
154
+ "fields": {
155
+ "name": "owner",
156
+ "type": "string",
157
+ "in": "path",
158
+ "description": ""
159
+ }
160
+ },
161
+ "field_2": {
162
+ "field_type": "path",
163
+ "fields": {
164
+ "name": "repo",
165
+ "type": "string",
166
+ "in": "path",
167
+ "description": ""
168
+ }
169
+ },
170
+ "field_3": {
171
+ "field_type": "path",
172
+ "fields": {
173
+ "name": "pull_number",
174
+ "type": "integer",
175
+ "in": "path",
176
+ "description": ""
177
+ }
178
+ },
179
+ "field_4": {
180
+ "field_type": "body",
181
+ "fields": {
182
+ "name": "location",
183
+ "type": "string",
184
+ "in": "body",
185
+ "description": "Location for this codespace. Assigned by IP if not provided"
186
+ }
187
+ },
188
+ "field_5": {
189
+ "field_type": "body",
190
+ "fields": {
191
+ "name": "machine",
192
+ "type": "string",
193
+ "in": "body",
194
+ "description": "Machine type to use for this codespace"
195
+ }
196
+ },
197
+ "field_6": {
198
+ "field_type": "body",
199
+ "fields": {
200
+ "name": "working_directory",
201
+ "type": "string",
202
+ "in": "body",
203
+ "description": "Working directory for this codespace"
204
+ }
205
+ },
206
+ "field_7": {
207
+ "field_type": "body",
208
+ "fields": {
209
+ "name": "idle_timeout_minutes",
210
+ "type": "integer",
211
+ "in": "body",
212
+ "description": "Time in minutes before codespace stops from inactivity"
213
+ }
214
+ },
215
+ "field_8": {
216
+ "field_type": "body",
217
+ "fields": {
218
+ "name": "display_name",
219
+ "type": "string",
220
+ "in": "body",
221
+ "description": "Display name for this codespace"
222
+ }
223
+ }
224
+ },
225
+ {
226
+ "namespace_description": "List codespaces for the authenticated user",
227
+ "method": "get",
228
+ "endpoint": "/user/codespaces",
229
+ "field_0": {
230
+ "field_type": "header",
231
+ "fields": {
232
+ "name": "accept",
233
+ "type": "string",
234
+ "in": "header",
235
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
236
+ }
237
+ },
238
+ "field_1": {
239
+ "field_type": "query",
240
+ "fields": {
241
+ "name": "per_page",
242
+ "type": "integer",
243
+ "in": "query",
244
+ "description": "Results per page (max 100)Default: 30"
245
+ }
246
+ },
247
+ "field_2": {
248
+ "field_type": "query",
249
+ "fields": {
250
+ "name": "page",
251
+ "type": "integer",
252
+ "in": "query",
253
+ "description": "Page number of the results to fetch.Default: 1"
254
+ }
255
+ },
256
+ "field_3": {
257
+ "field_type": "query",
258
+ "fields": {
259
+ "name": "repository_id",
260
+ "type": "integer",
261
+ "in": "query",
262
+ "description": "ID of the Repository to filter on"
263
+ }
264
+ }
265
+ },
266
+ {
267
+ "namespace_description": "Create a codespace for the authenticated user",
268
+ "method": "post",
269
+ "endpoint": "/user/codespaces",
270
+ "field_0": {
271
+ "field_type": "header",
272
+ "fields": {
273
+ "name": "accept",
274
+ "type": "string",
275
+ "in": "header",
276
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
277
+ }
278
+ },
279
+ "field_1": {
280
+ "field_type": "body",
281
+ "fields": {
282
+ "name": "repository_id",
283
+ "type": "integer",
284
+ "in": "body",
285
+ "description": "Required. Repository id for this codespace"
286
+ }
287
+ },
288
+ "field_2": {
289
+ "field_type": "body",
290
+ "fields": {
291
+ "name": "ref",
292
+ "type": "string",
293
+ "in": "body",
294
+ "description": "Git ref (typically a branch name) for this codespace"
295
+ }
296
+ },
297
+ "field_3": {
298
+ "field_type": "body",
299
+ "fields": {
300
+ "name": "location",
301
+ "type": "string",
302
+ "in": "body",
303
+ "description": "Location for this codespace. Assigned by IP if not provided"
304
+ }
305
+ },
306
+ "field_4": {
307
+ "field_type": "body",
308
+ "fields": {
309
+ "name": "machine",
310
+ "type": "string",
311
+ "in": "body",
312
+ "description": "Machine type to use for this codespace"
313
+ }
314
+ },
315
+ "field_5": {
316
+ "field_type": "body",
317
+ "fields": {
318
+ "name": "working_directory",
319
+ "type": "string",
320
+ "in": "body",
321
+ "description": "Working directory for this codespace"
322
+ }
323
+ },
324
+ "field_6": {
325
+ "field_type": "body",
326
+ "fields": {
327
+ "name": "idle_timeout_minutes",
328
+ "type": "integer",
329
+ "in": "body",
330
+ "description": "Time in minutes before codespace stops from inactivity"
331
+ }
332
+ },
333
+ "field_7": {
334
+ "field_type": "body",
335
+ "fields": {
336
+ "name": "display_name",
337
+ "type": "string",
338
+ "in": "body",
339
+ "description": "Display name for this codespace"
340
+ }
341
+ },
342
+ "field_8": {
343
+ "field_type": "body",
344
+ "fields": {
345
+ "name": "pull_request",
346
+ "type": "object",
347
+ "in": "body",
348
+ "description": "Required. Pull request number for this codespace"
349
+ }
350
+ },
351
+ "field_9": {
352
+ "field_type": null,
353
+ "fields": {
354
+ "name": "Properties of thepull_requestobjectName (Type)Descriptionpull_request_number (integer)Required. Pull request numberrepository_id (integer)Required. Repository id for this codespace",
355
+ "type": null,
356
+ "in": null,
357
+ "description": null
358
+ }
359
+ }
360
+ },
361
+ {
362
+ "namespace_description": "Get a codespace for the authenticated user",
363
+ "method": "get",
364
+ "endpoint": "/user/codespaces/{codespace_name}",
365
+ "field_0": {
366
+ "field_type": "header",
367
+ "fields": {
368
+ "name": "accept",
369
+ "type": "string",
370
+ "in": "header",
371
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
372
+ }
373
+ },
374
+ "field_1": {
375
+ "field_type": "path",
376
+ "fields": {
377
+ "name": "codespace_name",
378
+ "type": "string",
379
+ "in": "path",
380
+ "description": "The name of the codespace."
381
+ }
382
+ }
383
+ },
384
+ {
385
+ "namespace_description": "Update a codespace for the authenticated user",
386
+ "method": "patch",
387
+ "endpoint": "/user/codespaces/{codespace_name}",
388
+ "field_0": {
389
+ "field_type": "header",
390
+ "fields": {
391
+ "name": "accept",
392
+ "type": "string",
393
+ "in": "header",
394
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
395
+ }
396
+ },
397
+ "field_1": {
398
+ "field_type": "path",
399
+ "fields": {
400
+ "name": "codespace_name",
401
+ "type": "string",
402
+ "in": "path",
403
+ "description": "The name of the codespace."
404
+ }
405
+ },
406
+ "field_2": {
407
+ "field_type": "body",
408
+ "fields": {
409
+ "name": "machine",
410
+ "type": "string",
411
+ "in": "body",
412
+ "description": "A valid machine to transition this codespace to."
413
+ }
414
+ },
415
+ "field_3": {
416
+ "field_type": "body",
417
+ "fields": {
418
+ "name": "display_name",
419
+ "type": "string",
420
+ "in": "body",
421
+ "description": "Display name for this codespace"
422
+ }
423
+ },
424
+ "field_4": {
425
+ "field_type": "body",
426
+ "fields": {
427
+ "name": "recent_folders",
428
+ "type": "array of strings",
429
+ "in": "body",
430
+ "description": "Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in."
431
+ }
432
+ }
433
+ },
434
+ {
435
+ "namespace_description": "Delete a codespace for the authenticated user",
436
+ "method": "delete",
437
+ "endpoint": "/user/codespaces/{codespace_name}",
438
+ "field_0": {
439
+ "field_type": "header",
440
+ "fields": {
441
+ "name": "accept",
442
+ "type": "string",
443
+ "in": "header",
444
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
445
+ }
446
+ },
447
+ "field_1": {
448
+ "field_type": "path",
449
+ "fields": {
450
+ "name": "codespace_name",
451
+ "type": "string",
452
+ "in": "path",
453
+ "description": "The name of the codespace."
454
+ }
455
+ }
456
+ },
457
+ {
458
+ "namespace_description": "Export a codespace for the authenticated user",
459
+ "method": "post",
460
+ "endpoint": "/user/codespaces/{codespace_name}/exports",
461
+ "field_0": {
462
+ "field_type": "header",
463
+ "fields": {
464
+ "name": "accept",
465
+ "type": "string",
466
+ "in": "header",
467
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
468
+ }
469
+ },
470
+ "field_1": {
471
+ "field_type": "path",
472
+ "fields": {
473
+ "name": "codespace_name",
474
+ "type": "string",
475
+ "in": "path",
476
+ "description": "The name of the codespace."
477
+ }
478
+ }
479
+ },
480
+ {
481
+ "namespace_description": "Get details about a codespace export",
482
+ "method": "get",
483
+ "endpoint": "/user/codespaces/{codespace_name}/exports/{export_id}",
484
+ "field_0": {
485
+ "field_type": "header",
486
+ "fields": {
487
+ "name": "accept",
488
+ "type": "string",
489
+ "in": "header",
490
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
491
+ }
492
+ },
493
+ "field_1": {
494
+ "field_type": "path",
495
+ "fields": {
496
+ "name": "codespace_name",
497
+ "type": "string",
498
+ "in": "path",
499
+ "description": "The name of the codespace."
500
+ }
501
+ },
502
+ "field_2": {
503
+ "field_type": "path",
504
+ "fields": {
505
+ "name": "export_id",
506
+ "type": "string",
507
+ "in": "path",
508
+ "description": "The ID of the export operation, or latest. Currently only latest is currently supported."
509
+ }
510
+ }
511
+ },
512
+ {
513
+ "namespace_description": "Start a codespace for the authenticated user",
514
+ "method": "post",
515
+ "endpoint": "/user/codespaces/{codespace_name}/start",
516
+ "field_0": {
517
+ "field_type": "header",
518
+ "fields": {
519
+ "name": "accept",
520
+ "type": "string",
521
+ "in": "header",
522
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
523
+ }
524
+ },
525
+ "field_1": {
526
+ "field_type": "path",
527
+ "fields": {
528
+ "name": "codespace_name",
529
+ "type": "string",
530
+ "in": "path",
531
+ "description": "The name of the codespace."
532
+ }
533
+ }
534
+ },
535
+ {
536
+ "namespace_description": "Stop a codespace for the authenticated user",
537
+ "method": "post",
538
+ "endpoint": "/user/codespaces/{codespace_name}/stop",
539
+ "field_0": {
540
+ "field_type": "header",
541
+ "fields": {
542
+ "name": "accept",
543
+ "type": "string",
544
+ "in": "header",
545
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
546
+ }
547
+ },
548
+ "field_1": {
549
+ "field_type": "path",
550
+ "fields": {
551
+ "name": "codespace_name",
552
+ "type": "string",
553
+ "in": "path",
554
+ "description": "The name of the codespace."
555
+ }
556
+ }
557
+ },
558
+ {
559
+ "namespace_description": "List available machine types for a repository",
560
+ "method": "get",
561
+ "endpoint": "/repos/{owner}/{repo}/codespaces/machines",
562
+ "field_0": {
563
+ "field_type": "header",
564
+ "fields": {
565
+ "name": "accept",
566
+ "type": "string",
567
+ "in": "header",
568
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
569
+ }
570
+ },
571
+ "field_1": {
572
+ "field_type": "path",
573
+ "fields": {
574
+ "name": "owner",
575
+ "type": "string",
576
+ "in": "path",
577
+ "description": ""
578
+ }
579
+ },
580
+ "field_2": {
581
+ "field_type": "path",
582
+ "fields": {
583
+ "name": "repo",
584
+ "type": "string",
585
+ "in": "path",
586
+ "description": ""
587
+ }
588
+ },
589
+ "field_3": {
590
+ "field_type": "query",
591
+ "fields": {
592
+ "name": "location",
593
+ "type": "string",
594
+ "in": "query",
595
+ "description": "The location to check for available machines. Assigned by IP if not provided."
596
+ }
597
+ }
598
+ },
599
+ {
600
+ "namespace_description": "List machine types for a codespace",
601
+ "method": "get",
602
+ "endpoint": "/user/codespaces/{codespace_name}/machines",
603
+ "field_0": {
604
+ "field_type": "header",
605
+ "fields": {
606
+ "name": "accept",
607
+ "type": "string",
608
+ "in": "header",
609
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
610
+ }
611
+ },
612
+ "field_1": {
613
+ "field_type": "path",
614
+ "fields": {
615
+ "name": "codespace_name",
616
+ "type": "string",
617
+ "in": "path",
618
+ "description": "The name of the codespace."
619
+ }
620
+ }
621
+ },
622
+ {
623
+ "namespace_description": "List secrets for the authenticated user",
624
+ "method": "get",
625
+ "endpoint": "/user/codespaces/secrets",
626
+ "field_0": {
627
+ "field_type": "header",
628
+ "fields": {
629
+ "name": "accept",
630
+ "type": "string",
631
+ "in": "header",
632
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
633
+ }
634
+ },
635
+ "field_1": {
636
+ "field_type": "query",
637
+ "fields": {
638
+ "name": "per_page",
639
+ "type": "integer",
640
+ "in": "query",
641
+ "description": "Results per page (max 100)Default: 30"
642
+ }
643
+ },
644
+ "field_2": {
645
+ "field_type": "query",
646
+ "fields": {
647
+ "name": "page",
648
+ "type": "integer",
649
+ "in": "query",
650
+ "description": "Page number of the results to fetch.Default: 1"
651
+ }
652
+ }
653
+ },
654
+ {
655
+ "namespace_description": "Get public key for the authenticated user",
656
+ "method": "get",
657
+ "endpoint": "/user/codespaces/secrets/public-key",
658
+ "field_0": {
659
+ "field_type": "header",
660
+ "fields": {
661
+ "name": "accept",
662
+ "type": "string",
663
+ "in": "header",
664
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
665
+ }
666
+ }
667
+ },
668
+ {
669
+ "namespace_description": "Get a secret for the authenticated user",
670
+ "method": "get",
671
+ "endpoint": "/user/codespaces/secrets/{secret_name}",
672
+ "field_0": {
673
+ "field_type": "header",
674
+ "fields": {
675
+ "name": "accept",
676
+ "type": "string",
677
+ "in": "header",
678
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
679
+ }
680
+ },
681
+ "field_1": {
682
+ "field_type": "path",
683
+ "fields": {
684
+ "name": "secret_name",
685
+ "type": "string",
686
+ "in": "path",
687
+ "description": "secret_name parameter"
688
+ }
689
+ }
690
+ },
691
+ {
692
+ "namespace_description": "Create or update a secret for the authenticated user",
693
+ "method": "require\"rbnacl\"require\"base64\"\"+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=\"\"my_secret\"# Print the base64 encoded secretput",
694
+ "endpoint": "const sodium = require('tweetsodium');\n\nconst key = \"base64-encoded-public-key\";\nconst value = \"plain-text-secret\";\n\n// Convert the message and key to Uint8Array's (Buffer implements that interface)\nconst messageBytes = Buffer.from(value);\nconst keyBytes = Buffer.from(key, 'base64');\n\n// Encrypt using LibSodium.\nconst encryptedBytes = sodium.seal(messageBytes, keyBytes);\n\n// Base64 the encrypted secret\nconst encrypted = Buffer.from(encryptedBytes).toString('base64');\n\nconsole.log(encrypted);\n",
695
+ "field_0": {
696
+ "field_type": "header",
697
+ "fields": {
698
+ "name": "accept",
699
+ "type": "string",
700
+ "in": "header",
701
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
702
+ }
703
+ },
704
+ "field_1": {
705
+ "field_type": "path",
706
+ "fields": {
707
+ "name": "secret_name",
708
+ "type": "string",
709
+ "in": "path",
710
+ "description": "secret_name parameter"
711
+ }
712
+ },
713
+ "field_2": {
714
+ "field_type": "body",
715
+ "fields": {
716
+ "name": "encrypted_value",
717
+ "type": "string",
718
+ "in": "body",
719
+ "description": "Value for your secret, encrypted with LibSodium using the public key retrieved from the Get the public key for the authenticated user endpoint."
720
+ }
721
+ },
722
+ "field_3": {
723
+ "field_type": "body",
724
+ "fields": {
725
+ "name": "key_id",
726
+ "type": "string",
727
+ "in": "body",
728
+ "description": "Required. ID of the key you used to encrypt the secret."
729
+ }
730
+ },
731
+ "field_4": {
732
+ "field_type": "body",
733
+ "fields": {
734
+ "name": "selected_repository_ids",
735
+ "type": "array of strings",
736
+ "in": "body",
737
+ "description": "An array of repository ids that can access the user secret. You can manage the list of selected repositories using the List selected repositories for a user secret, Set selected repositories for a user secret, and Remove a selected repository from a user secret endpoints."
738
+ }
739
+ }
740
+ },
741
+ {
742
+ "namespace_description": "Delete a secret for the authenticated user",
743
+ "method": "delete",
744
+ "endpoint": "/user/codespaces/secrets/{secret_name}",
745
+ "field_0": {
746
+ "field_type": "header",
747
+ "fields": {
748
+ "name": "accept",
749
+ "type": "string",
750
+ "in": "header",
751
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
752
+ }
753
+ },
754
+ "field_1": {
755
+ "field_type": "path",
756
+ "fields": {
757
+ "name": "secret_name",
758
+ "type": "string",
759
+ "in": "path",
760
+ "description": "secret_name parameter"
761
+ }
762
+ }
763
+ },
764
+ {
765
+ "namespace_description": "List selected repositories for a user secret",
766
+ "method": "get",
767
+ "endpoint": "/user/codespaces/secrets/{secret_name}/repositories",
768
+ "field_0": {
769
+ "field_type": "header",
770
+ "fields": {
771
+ "name": "accept",
772
+ "type": "string",
773
+ "in": "header",
774
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
775
+ }
776
+ },
777
+ "field_1": {
778
+ "field_type": "path",
779
+ "fields": {
780
+ "name": "secret_name",
781
+ "type": "string",
782
+ "in": "path",
783
+ "description": "secret_name parameter"
784
+ }
785
+ }
786
+ },
787
+ {
788
+ "namespace_description": "Set selected repositories for a user secret",
789
+ "method": "put",
790
+ "endpoint": "/user/codespaces/secrets/{secret_name}/repositories",
791
+ "field_0": {
792
+ "field_type": "header",
793
+ "fields": {
794
+ "name": "accept",
795
+ "type": "string",
796
+ "in": "header",
797
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
798
+ }
799
+ },
800
+ "field_1": {
801
+ "field_type": "path",
802
+ "fields": {
803
+ "name": "secret_name",
804
+ "type": "string",
805
+ "in": "path",
806
+ "description": "secret_name parameter"
807
+ }
808
+ },
809
+ "field_2": {
810
+ "field_type": "body",
811
+ "fields": {
812
+ "name": "selected_repository_ids",
813
+ "type": "array of integers",
814
+ "in": "body",
815
+ "description": "Required. An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the List selected repositories for a user secret, Add a selected repository to a user secret, and Remove a selected repository from a user secret endpoints."
816
+ }
817
+ }
818
+ },
819
+ {
820
+ "namespace_description": "Add a selected repository to a user secret",
821
+ "method": "put",
822
+ "endpoint": "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}",
823
+ "field_0": {
824
+ "field_type": "header",
825
+ "fields": {
826
+ "name": "accept",
827
+ "type": "string",
828
+ "in": "header",
829
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
830
+ }
831
+ },
832
+ "field_1": {
833
+ "field_type": "path",
834
+ "fields": {
835
+ "name": "secret_name",
836
+ "type": "string",
837
+ "in": "path",
838
+ "description": "secret_name parameter"
839
+ }
840
+ },
841
+ "field_2": {
842
+ "field_type": "path",
843
+ "fields": {
844
+ "name": "repository_id",
845
+ "type": "integer",
846
+ "in": "path",
847
+ "description": ""
848
+ }
849
+ }
850
+ },
851
+ {
852
+ "namespace_description": "Remove a selected repository from a user secret",
853
+ "method": "delete",
854
+ "endpoint": "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}",
855
+ "field_0": {
856
+ "field_type": "header",
857
+ "fields": {
858
+ "name": "accept",
859
+ "type": "string",
860
+ "in": "header",
861
+ "description": "Setting toapplication/vnd.github.v3+json is recommended."
862
+ }
863
+ },
864
+ "field_1": {
865
+ "field_type": "path",
866
+ "fields": {
867
+ "name": "secret_name",
868
+ "type": "string",
869
+ "in": "path",
870
+ "description": "secret_name parameter"
871
+ }
872
+ },
873
+ "field_2": {
874
+ "field_type": "path",
875
+ "fields": {
876
+ "name": "repository_id",
877
+ "type": "integer",
878
+ "in": "path",
879
+ "description": ""
880
+ }
881
+ }
882
+ }
883
+ ]
884
+ }