all-contributors-for-repository 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/lib/Contributor.d.ts +5 -0
  2. package/lib/Contributor.d.ts.map +1 -0
  3. package/lib/Contributor.js +9 -0
  4. package/lib/Contributor.js.map +1 -0
  5. package/lib/api.d.ts +1 -0
  6. package/lib/api.d.ts.map +1 -0
  7. package/lib/api.js +4 -0
  8. package/lib/api.js.map +1 -0
  9. package/lib/co.d.ts +510 -0
  10. package/lib/co.d.ts.map +1 -0
  11. package/lib/co.js +14 -0
  12. package/lib/co.js.map +1 -0
  13. package/lib/collect/api copy.js +21 -0
  14. package/lib/collect/api copy.js.map +1 -0
  15. package/lib/collect/collect.d.ts +4 -0
  16. package/lib/collect/collect.d.ts.map +1 -0
  17. package/lib/collect/collect.js +54 -0
  18. package/lib/collect/collect.js.map +1 -0
  19. package/lib/collect/paginate.d.ts +2 -0
  20. package/lib/collect/paginate.d.ts.map +1 -0
  21. package/lib/collect/paginate.js +21 -0
  22. package/lib/collect/paginate.js.map +1 -0
  23. package/lib/collect/paginate.test.d.ts +1 -0
  24. package/lib/collect/paginate.test.d.ts.map +1 -0
  25. package/lib/collect/paginate.test.js +2 -0
  26. package/lib/collect/paginate.test.js.map +1 -0
  27. package/lib/collect.d.ts +6 -0
  28. package/lib/collect.d.ts.map +1 -0
  29. package/lib/collect.js +54 -0
  30. package/lib/collect.js.map +1 -0
  31. package/lib/collectAcceptedBugs.d.ts +508 -0
  32. package/lib/collectAcceptedBugs.d.ts.map +1 -0
  33. package/lib/collectAcceptedBugs.js +14 -0
  34. package/lib/collectAcceptedBugs.js.map +1 -0
  35. package/lib/collectAcceptedIssues copy.d.ts +510 -0
  36. package/lib/collectAcceptedIssues copy.d.ts.map +1 -0
  37. package/lib/collectAcceptedIssues copy.js +14 -0
  38. package/lib/collectAcceptedIssues copy.js.map +1 -0
  39. package/lib/collectAcceptedIssues.d.ts +510 -0
  40. package/lib/collectAcceptedIssues.d.ts.map +1 -0
  41. package/lib/collectAcceptedIssues.js +14 -0
  42. package/lib/collectAcceptedIssues.js.map +1 -0
  43. package/lib/collectEvents.d.ts +510 -0
  44. package/lib/collectEvents.d.ts.map +1 -0
  45. package/lib/collectEvents.js +14 -0
  46. package/lib/collectEvents.js.map +1 -0
  47. package/lib/collectMergedPulls.d.ts +496 -0
  48. package/lib/collectMergedPulls.d.ts.map +1 -0
  49. package/lib/collectMergedPulls.js +12 -0
  50. package/lib/collectMergedPulls.js.map +1 -0
  51. package/lib/collectRepositoryEvents.d.ts +510 -0
  52. package/lib/collectRepositoryEvents.d.ts.map +1 -0
  53. package/lib/collectRepositoryEvents.js +14 -0
  54. package/lib/collectRepositoryEvents.js.map +1 -0
  55. package/lib/collectors/collectAcceptedIssues.d.ts +510 -0
  56. package/lib/collectors/collectAcceptedIssues.d.ts.map +1 -0
  57. package/lib/collectors/collectAcceptedIssues.js +14 -0
  58. package/lib/collectors/collectAcceptedIssues.js.map +1 -0
  59. package/lib/collectors/collectEvents copy.d.ts +643 -0
  60. package/lib/collectors/collectEvents copy.d.ts.map +1 -0
  61. package/lib/collectors/collectEvents copy.js +15 -0
  62. package/lib/collectors/collectEvents copy.js.map +1 -0
  63. package/lib/collectors/collectEvents.d.ts +643 -0
  64. package/lib/collectors/collectEvents.d.ts.map +1 -0
  65. package/lib/collectors/collectEvents.js +13 -0
  66. package/lib/collectors/collectEvents.js.map +1 -0
  67. package/lib/collectors/collectIssueEvents.d.ts +742 -0
  68. package/lib/collectors/collectIssueEvents.d.ts.map +1 -0
  69. package/lib/collectors/collectIssueEvents.js +20 -0
  70. package/lib/collectors/collectIssueEvents.js.map +1 -0
  71. package/lib/collectors/collectMergedPulls.d.ts +496 -0
  72. package/lib/collectors/collectMergedPulls.d.ts.map +1 -0
  73. package/lib/collectors/collectMergedPulls.js +12 -0
  74. package/lib/collectors/collectMergedPulls.js.map +1 -0
  75. package/lib/greet.d.ts +3 -0
  76. package/lib/greet.d.ts.map +1 -0
  77. package/lib/greet.js +7 -0
  78. package/lib/greet.js.map +1 -0
  79. package/lib/types.d.ts +6 -0
  80. package/lib/types.d.ts.map +1 -0
  81. package/lib/types.js +2 -0
  82. package/lib/types.js.map +1 -0
  83. package/package.json +2 -2
@@ -0,0 +1,5 @@
1
+ export declare class Contributor {
2
+ readonly contributions: Record<string, number[]>;
3
+ add(id: number, type: string): void;
4
+ }
5
+ //# sourceMappingURL=Contributor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Contributor.d.ts","sourceRoot":"","sources":["../src/Contributor.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAW;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;IAEtD,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAG5B"}
@@ -0,0 +1,9 @@
1
+ export class Contributor {
2
+ constructor() {
3
+ this.contributions = {};
4
+ }
5
+ add(id, type) {
6
+ (this.contributions[type] ??= []).push(id);
7
+ }
8
+ }
9
+ //# sourceMappingURL=Contributor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Contributor.js","sourceRoot":"","sources":["../src/Contributor.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,WAAW;IAAxB;QACU,kBAAa,GAA6B,EAAE,CAAC;IAKvD,CAAC;IAHA,GAAG,CAAC,EAAU,EAAE,IAAY;QAC3B,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;CACD"}
package/lib/api.d.ts ADDED
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":""}
package/lib/api.js ADDED
@@ -0,0 +1,4 @@
1
+ import { paginateRest } from "@octokit/plugin-paginate-rest";
2
+ import { Octokit } from "octokit";
3
+ export const OctokitWithPagination = Octokit.plugin(paginateRest);
4
+ //# sourceMappingURL=api.js.map
package/lib/api.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC"}
package/lib/co.d.ts ADDED
@@ -0,0 +1,510 @@
1
+ import { Octokit } from "octokit";
2
+ export declare function collectAcceptedIssues(octokit: Octokit, labelAcceptingPrs: string): Promise<{
3
+ [k: string]: {
4
+ id: number;
5
+ node_id: string;
6
+ url: string;
7
+ repository_url: string;
8
+ labels_url: string;
9
+ comments_url: string;
10
+ events_url: string;
11
+ html_url: string;
12
+ number: number;
13
+ state: string;
14
+ state_reason?: "completed" | "reopened" | "not_planned" | null | undefined;
15
+ title: string;
16
+ body?: string | null | undefined;
17
+ user: {
18
+ name?: string | null | undefined;
19
+ email?: string | null | undefined;
20
+ login: string;
21
+ id: number;
22
+ node_id: string;
23
+ avatar_url: string;
24
+ gravatar_id: string | null;
25
+ url: string;
26
+ html_url: string;
27
+ followers_url: string;
28
+ following_url: string;
29
+ gists_url: string;
30
+ starred_url: string;
31
+ subscriptions_url: string;
32
+ organizations_url: string;
33
+ repos_url: string;
34
+ events_url: string;
35
+ received_events_url: string;
36
+ type: string;
37
+ site_admin: boolean;
38
+ starred_at?: string | undefined;
39
+ } | null;
40
+ labels: (string | {
41
+ id?: number | undefined;
42
+ node_id?: string | undefined;
43
+ url?: string | undefined;
44
+ name?: string | undefined;
45
+ description?: string | null | undefined;
46
+ color?: string | null | undefined;
47
+ default?: boolean | undefined;
48
+ })[];
49
+ assignee: {
50
+ name?: string | null | undefined;
51
+ email?: string | null | undefined;
52
+ login: string;
53
+ id: number;
54
+ node_id: string;
55
+ avatar_url: string;
56
+ gravatar_id: string | null;
57
+ url: string;
58
+ html_url: string;
59
+ followers_url: string;
60
+ following_url: string;
61
+ gists_url: string;
62
+ starred_url: string;
63
+ subscriptions_url: string;
64
+ organizations_url: string;
65
+ repos_url: string;
66
+ events_url: string;
67
+ received_events_url: string;
68
+ type: string;
69
+ site_admin: boolean;
70
+ starred_at?: string | undefined;
71
+ } | null;
72
+ assignees?: {
73
+ name?: string | null | undefined;
74
+ email?: string | null | undefined;
75
+ login: string;
76
+ id: number;
77
+ node_id: string;
78
+ avatar_url: string;
79
+ gravatar_id: string | null;
80
+ url: string;
81
+ html_url: string;
82
+ followers_url: string;
83
+ following_url: string;
84
+ gists_url: string;
85
+ starred_url: string;
86
+ subscriptions_url: string;
87
+ organizations_url: string;
88
+ repos_url: string;
89
+ events_url: string;
90
+ received_events_url: string;
91
+ type: string;
92
+ site_admin: boolean;
93
+ starred_at?: string | undefined;
94
+ }[] | null | undefined;
95
+ milestone: {
96
+ url: string;
97
+ html_url: string;
98
+ labels_url: string;
99
+ id: number;
100
+ node_id: string;
101
+ number: number;
102
+ state: "open" | "closed";
103
+ title: string;
104
+ description: string | null;
105
+ creator: {
106
+ name?: string | null | undefined;
107
+ email?: string | null | undefined;
108
+ login: string;
109
+ id: number;
110
+ node_id: string;
111
+ avatar_url: string;
112
+ gravatar_id: string | null;
113
+ url: string;
114
+ html_url: string;
115
+ followers_url: string;
116
+ following_url: string;
117
+ gists_url: string;
118
+ starred_url: string;
119
+ subscriptions_url: string;
120
+ organizations_url: string;
121
+ repos_url: string;
122
+ events_url: string;
123
+ received_events_url: string;
124
+ type: string;
125
+ site_admin: boolean;
126
+ starred_at?: string | undefined;
127
+ } | null;
128
+ open_issues: number;
129
+ closed_issues: number;
130
+ created_at: string;
131
+ updated_at: string;
132
+ closed_at: string | null;
133
+ due_on: string | null;
134
+ } | null;
135
+ locked: boolean;
136
+ active_lock_reason?: string | null | undefined;
137
+ comments: number;
138
+ pull_request?: {
139
+ merged_at?: string | null | undefined;
140
+ diff_url: string | null;
141
+ html_url: string | null;
142
+ patch_url: string | null;
143
+ url: string | null;
144
+ } | undefined;
145
+ closed_at: string | null;
146
+ created_at: string;
147
+ updated_at: string;
148
+ draft?: boolean | undefined;
149
+ closed_by?: {
150
+ name?: string | null | undefined;
151
+ email?: string | null | undefined;
152
+ login: string;
153
+ id: number;
154
+ node_id: string;
155
+ avatar_url: string;
156
+ gravatar_id: string | null;
157
+ url: string;
158
+ html_url: string;
159
+ followers_url: string;
160
+ following_url: string;
161
+ gists_url: string;
162
+ starred_url: string;
163
+ subscriptions_url: string;
164
+ organizations_url: string;
165
+ repos_url: string;
166
+ events_url: string;
167
+ received_events_url: string;
168
+ type: string;
169
+ site_admin: boolean;
170
+ starred_at?: string | undefined;
171
+ } | null | undefined;
172
+ body_html?: string | undefined;
173
+ body_text?: string | undefined;
174
+ timeline_url?: string | undefined;
175
+ repository?: {
176
+ id: number;
177
+ node_id: string;
178
+ name: string;
179
+ full_name: string;
180
+ license: {
181
+ key: string;
182
+ name: string;
183
+ url: string | null;
184
+ spdx_id: string | null;
185
+ node_id: string;
186
+ html_url?: string | undefined;
187
+ } | null;
188
+ organization?: {
189
+ name?: string | null | undefined;
190
+ email?: string | null | undefined;
191
+ login: string;
192
+ id: number;
193
+ node_id: string;
194
+ avatar_url: string;
195
+ gravatar_id: string | null;
196
+ url: string;
197
+ html_url: string;
198
+ followers_url: string;
199
+ following_url: string;
200
+ gists_url: string;
201
+ starred_url: string;
202
+ subscriptions_url: string;
203
+ organizations_url: string;
204
+ repos_url: string;
205
+ events_url: string;
206
+ received_events_url: string;
207
+ type: string;
208
+ site_admin: boolean;
209
+ starred_at?: string | undefined;
210
+ } | null | undefined;
211
+ forks: number;
212
+ permissions?: {
213
+ admin: boolean;
214
+ pull: boolean;
215
+ triage?: boolean | undefined;
216
+ push: boolean;
217
+ maintain?: boolean | undefined;
218
+ } | undefined;
219
+ owner: {
220
+ name?: string | null | undefined;
221
+ email?: string | null | undefined;
222
+ login: string;
223
+ id: number;
224
+ node_id: string;
225
+ avatar_url: string;
226
+ gravatar_id: string | null;
227
+ url: string;
228
+ html_url: string;
229
+ followers_url: string;
230
+ following_url: string;
231
+ gists_url: string;
232
+ starred_url: string;
233
+ subscriptions_url: string;
234
+ organizations_url: string;
235
+ repos_url: string;
236
+ events_url: string;
237
+ received_events_url: string;
238
+ type: string;
239
+ site_admin: boolean;
240
+ starred_at?: string | undefined;
241
+ };
242
+ private: boolean;
243
+ html_url: string;
244
+ description: string | null;
245
+ fork: boolean;
246
+ url: string;
247
+ archive_url: string;
248
+ assignees_url: string;
249
+ blobs_url: string;
250
+ branches_url: string;
251
+ collaborators_url: string;
252
+ comments_url: string;
253
+ commits_url: string;
254
+ compare_url: string;
255
+ contents_url: string;
256
+ contributors_url: string;
257
+ deployments_url: string;
258
+ downloads_url: string;
259
+ events_url: string;
260
+ forks_url: string;
261
+ git_commits_url: string;
262
+ git_refs_url: string;
263
+ git_tags_url: string;
264
+ git_url: string;
265
+ issue_comment_url: string;
266
+ issue_events_url: string;
267
+ issues_url: string;
268
+ keys_url: string;
269
+ labels_url: string;
270
+ languages_url: string;
271
+ merges_url: string;
272
+ milestones_url: string;
273
+ notifications_url: string;
274
+ pulls_url: string;
275
+ releases_url: string;
276
+ ssh_url: string;
277
+ stargazers_url: string;
278
+ statuses_url: string;
279
+ subscribers_url: string;
280
+ subscription_url: string;
281
+ tags_url: string;
282
+ teams_url: string;
283
+ trees_url: string;
284
+ clone_url: string;
285
+ mirror_url: string | null;
286
+ hooks_url: string;
287
+ svn_url: string;
288
+ homepage: string | null;
289
+ language: string | null;
290
+ forks_count: number;
291
+ stargazers_count: number;
292
+ watchers_count: number;
293
+ size: number;
294
+ default_branch: string;
295
+ open_issues_count: number;
296
+ is_template?: boolean | undefined;
297
+ topics?: string[] | undefined;
298
+ has_issues: boolean;
299
+ has_projects: boolean;
300
+ has_wiki: boolean;
301
+ has_pages: boolean;
302
+ has_downloads: boolean;
303
+ has_discussions?: boolean | undefined;
304
+ archived: boolean;
305
+ disabled: boolean;
306
+ visibility?: string | undefined;
307
+ pushed_at: string | null;
308
+ created_at: string | null;
309
+ updated_at: string | null;
310
+ allow_rebase_merge?: boolean | undefined;
311
+ template_repository?: {
312
+ id?: number | undefined;
313
+ node_id?: string | undefined;
314
+ name?: string | undefined;
315
+ full_name?: string | undefined;
316
+ owner?: {
317
+ login?: string | undefined;
318
+ id?: number | undefined;
319
+ node_id?: string | undefined;
320
+ avatar_url?: string | undefined;
321
+ gravatar_id?: string | undefined;
322
+ url?: string | undefined;
323
+ html_url?: string | undefined;
324
+ followers_url?: string | undefined;
325
+ following_url?: string | undefined;
326
+ gists_url?: string | undefined;
327
+ starred_url?: string | undefined;
328
+ subscriptions_url?: string | undefined;
329
+ organizations_url?: string | undefined;
330
+ repos_url?: string | undefined;
331
+ events_url?: string | undefined;
332
+ received_events_url?: string | undefined;
333
+ type?: string | undefined;
334
+ site_admin?: boolean | undefined;
335
+ } | undefined;
336
+ private?: boolean | undefined;
337
+ html_url?: string | undefined;
338
+ description?: string | undefined;
339
+ fork?: boolean | undefined;
340
+ url?: string | undefined;
341
+ archive_url?: string | undefined;
342
+ assignees_url?: string | undefined;
343
+ blobs_url?: string | undefined;
344
+ branches_url?: string | undefined;
345
+ collaborators_url?: string | undefined;
346
+ comments_url?: string | undefined;
347
+ commits_url?: string | undefined;
348
+ compare_url?: string | undefined;
349
+ contents_url?: string | undefined;
350
+ contributors_url?: string | undefined;
351
+ deployments_url?: string | undefined;
352
+ downloads_url?: string | undefined;
353
+ events_url?: string | undefined;
354
+ forks_url?: string | undefined;
355
+ git_commits_url?: string | undefined;
356
+ git_refs_url?: string | undefined;
357
+ git_tags_url?: string | undefined;
358
+ git_url?: string | undefined;
359
+ issue_comment_url?: string | undefined;
360
+ issue_events_url?: string | undefined;
361
+ issues_url?: string | undefined;
362
+ keys_url?: string | undefined;
363
+ labels_url?: string | undefined;
364
+ languages_url?: string | undefined;
365
+ merges_url?: string | undefined;
366
+ milestones_url?: string | undefined;
367
+ notifications_url?: string | undefined;
368
+ pulls_url?: string | undefined;
369
+ releases_url?: string | undefined;
370
+ ssh_url?: string | undefined;
371
+ stargazers_url?: string | undefined;
372
+ statuses_url?: string | undefined;
373
+ subscribers_url?: string | undefined;
374
+ subscription_url?: string | undefined;
375
+ tags_url?: string | undefined;
376
+ teams_url?: string | undefined;
377
+ trees_url?: string | undefined;
378
+ clone_url?: string | undefined;
379
+ mirror_url?: string | undefined;
380
+ hooks_url?: string | undefined;
381
+ svn_url?: string | undefined;
382
+ homepage?: string | undefined;
383
+ language?: string | undefined;
384
+ forks_count?: number | undefined;
385
+ stargazers_count?: number | undefined;
386
+ watchers_count?: number | undefined;
387
+ size?: number | undefined;
388
+ default_branch?: string | undefined;
389
+ open_issues_count?: number | undefined;
390
+ is_template?: boolean | undefined;
391
+ topics?: string[] | undefined;
392
+ has_issues?: boolean | undefined;
393
+ has_projects?: boolean | undefined;
394
+ has_wiki?: boolean | undefined;
395
+ has_pages?: boolean | undefined;
396
+ has_downloads?: boolean | undefined;
397
+ archived?: boolean | undefined;
398
+ disabled?: boolean | undefined;
399
+ visibility?: string | undefined;
400
+ pushed_at?: string | undefined;
401
+ created_at?: string | undefined;
402
+ updated_at?: string | undefined;
403
+ permissions?: {
404
+ admin?: boolean | undefined;
405
+ maintain?: boolean | undefined;
406
+ push?: boolean | undefined;
407
+ triage?: boolean | undefined;
408
+ pull?: boolean | undefined;
409
+ } | undefined;
410
+ allow_rebase_merge?: boolean | undefined;
411
+ temp_clone_token?: string | undefined;
412
+ allow_squash_merge?: boolean | undefined;
413
+ allow_auto_merge?: boolean | undefined;
414
+ delete_branch_on_merge?: boolean | undefined;
415
+ allow_update_branch?: boolean | undefined;
416
+ use_squash_pr_title_as_default?: boolean | undefined;
417
+ squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" | undefined;
418
+ squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" | undefined;
419
+ merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" | undefined;
420
+ merge_commit_message?: "PR_TITLE" | "PR_BODY" | "BLANK" | undefined;
421
+ allow_merge_commit?: boolean | undefined;
422
+ subscribers_count?: number | undefined;
423
+ network_count?: number | undefined;
424
+ } | null | undefined;
425
+ temp_clone_token?: string | undefined;
426
+ allow_squash_merge?: boolean | undefined;
427
+ allow_auto_merge?: boolean | undefined;
428
+ delete_branch_on_merge?: boolean | undefined;
429
+ allow_update_branch?: boolean | undefined;
430
+ use_squash_pr_title_as_default?: boolean | undefined;
431
+ squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE" | undefined;
432
+ squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK" | undefined;
433
+ merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE" | undefined;
434
+ merge_commit_message?: "PR_TITLE" | "PR_BODY" | "BLANK" | undefined;
435
+ allow_merge_commit?: boolean | undefined;
436
+ allow_forking?: boolean | undefined;
437
+ web_commit_signoff_required?: boolean | undefined;
438
+ subscribers_count?: number | undefined;
439
+ network_count?: number | undefined;
440
+ open_issues: number;
441
+ watchers: number;
442
+ master_branch?: string | undefined;
443
+ starred_at?: string | undefined;
444
+ anonymous_access_enabled?: boolean | undefined;
445
+ } | undefined;
446
+ performed_via_github_app?: {
447
+ id: number;
448
+ slug?: string | undefined;
449
+ node_id: string;
450
+ owner: {
451
+ name?: string | null | undefined;
452
+ email?: string | null | undefined;
453
+ login: string;
454
+ id: number;
455
+ node_id: string;
456
+ avatar_url: string;
457
+ gravatar_id: string | null;
458
+ url: string;
459
+ html_url: string;
460
+ followers_url: string;
461
+ following_url: string;
462
+ gists_url: string;
463
+ starred_url: string;
464
+ subscriptions_url: string;
465
+ organizations_url: string;
466
+ repos_url: string;
467
+ events_url: string;
468
+ received_events_url: string;
469
+ type: string;
470
+ site_admin: boolean;
471
+ starred_at?: string | undefined;
472
+ } | null;
473
+ name: string;
474
+ description: string | null;
475
+ external_url: string;
476
+ html_url: string;
477
+ created_at: string;
478
+ updated_at: string;
479
+ permissions: {
480
+ issues?: string | undefined;
481
+ checks?: string | undefined;
482
+ metadata?: string | undefined;
483
+ contents?: string | undefined;
484
+ deployments?: string | undefined;
485
+ } & {
486
+ [key: string]: string;
487
+ };
488
+ events: string[];
489
+ installations_count?: number | undefined;
490
+ client_id?: string | undefined;
491
+ client_secret?: string | undefined;
492
+ webhook_secret?: string | null | undefined;
493
+ pem?: string | undefined;
494
+ } | null | undefined;
495
+ author_association: "COLLABORATOR" | "CONTRIBUTOR" | "FIRST_TIMER" | "FIRST_TIME_CONTRIBUTOR" | "MANNEQUIN" | "MEMBER" | "NONE" | "OWNER";
496
+ reactions?: {
497
+ url: string;
498
+ total_count: number;
499
+ "+1": number;
500
+ "-1": number;
501
+ laugh: number;
502
+ confused: number;
503
+ heart: number;
504
+ hooray: number;
505
+ eyes: number;
506
+ rocket: number;
507
+ } | undefined;
508
+ };
509
+ }>;
510
+ //# sourceMappingURL=co.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"co.d.ts","sourceRoot":"","sources":["../src/co.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmBzB"}
package/lib/co.js ADDED
@@ -0,0 +1,14 @@
1
+ export async function collectAcceptedIssues(octokit, labelAcceptingPrs) {
2
+ const issuesResponse = await octokit.request("GET /repos/{owner}/{repo}/issues", {
3
+ headers: {
4
+ "X-GitHub-Api-Version": "2022-11-28",
5
+ },
6
+ labels: labelAcceptingPrs,
7
+ owner: "JoshuaKGoldberg",
8
+ per_page: 100,
9
+ repo: "template-typescript-node-package",
10
+ state: "all",
11
+ });
12
+ return Object.fromEntries(issuesResponse.data.map((issue) => [issue.number, issue]));
13
+ }
14
+ //# sourceMappingURL=co.js.map
package/lib/co.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"co.js","sourceRoot":"","sources":["../src/co.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAC1C,OAAgB,EAChB,iBAAyB;IAEzB,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC,OAAO,CAC3C,kCAAkC,EAClC;QACC,OAAO,EAAE;YACR,sBAAsB,EAAE,YAAY;SACpC;QACD,MAAM,EAAE,iBAAiB;QACzB,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,GAAG;QACb,IAAI,EAAE,kCAAkC;QACxC,KAAK,EAAE,KAAK;KACZ,CACD,CAAC;IAEF,OAAO,MAAM,CAAC,WAAW,CACxB,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CACzD,CAAC;AACH,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { Octokit } from "octokit";
2
+ const perPage = 100;
3
+ export function createOctokit(options) {
4
+ return new (Octokit.defaults({
5
+ owner: options.owner,
6
+ per_page: perPage,
7
+ repo: options.repo,
8
+ }))({ auth: options.auth });
9
+ }
10
+ export async function paginate(request) {
11
+ const items = [];
12
+ for (let i = 0;; i += 1) {
13
+ const response = await request(i, perPage);
14
+ items.push(...response);
15
+ if (response.length < perPage) {
16
+ break;
17
+ }
18
+ }
19
+ return items;
20
+ }
21
+ //# sourceMappingURL=api%20copy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api copy.js","sourceRoot":"","sources":["../../src/collect/api copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIlC,MAAM,OAAO,GAAG,GAAG,CAAC;AAEpB,MAAM,UAAU,aAAa,CAAC,OAA4C;IACzE,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,QAAQ,EAAE,OAAO;QACjB,IAAI,EAAE,OAAO,CAAC,IAAI;KAClB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC7B,OAAwD;IAExD,MAAM,KAAK,GAAQ,EAAE,CAAC;IAEtB,KAAK,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,IAAI,CAAC,EAAE;QACzB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QAE3C,KAAK,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;QAExB,IAAI,QAAQ,CAAC,MAAM,GAAG,OAAO,EAAE;YAC9B,MAAM;SACN;KACD;IAED,OAAO,KAAK,CAAC;AACd,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Octokit } from "octokit";
2
+ import { AllContributorsForRepositoryOptions } from "./options.js";
3
+ export declare function collect(octokit: Octokit, options: AllContributorsForRepositoryOptions): Promise<any>;
4
+ //# sourceMappingURL=collect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect.d.ts","sourceRoot":"","sources":["../../src/collect/collect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAOlC,OAAO,EAAE,mCAAmC,EAAE,MAAM,cAAc,CAAC;AAEnE,wBAAsB,OAAO,CAC5B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,mCAAmC,gBAkE5C"}
@@ -0,0 +1,54 @@
1
+ import { collectAcceptedIssues } from "./collectors/collectAcceptedIssues.js";
2
+ import { collectEvents } from "./collectors/collectEvents.js";
3
+ import { collectIssueEvents } from "./collectors/collectIssueEvents.js";
4
+ import { collectMergedPulls } from "./collectors/collectMergedPulls.js";
5
+ import { ContributorsCollection } from "./ContributorsCollection.js";
6
+ export async function collect(octokit, options) {
7
+ const contributors = new ContributorsCollection(options.ignoredLogins);
8
+ const acceptedIssues = await collectAcceptedIssues(octokit, options.labelAcceptingPrs);
9
+ for (const acceptedIssue of Object.values(acceptedIssues)) {
10
+ const labels = acceptedIssue.labels.map((label) => typeof label === "string" ? label : label.name);
11
+ for (const [labelType, contribution] of [
12
+ // 🐛 `bug`: anybody who filed an issue labeled as accepting PRs and a bug
13
+ [options.labelTypeBug, "bug"],
14
+ // - 📖 `doc`: authors of merged PRs that address issues labeled as docs
15
+ [options.labelTypeDocs, "docs"],
16
+ // - 🔧 `tool`: authors of merged PRs that address issues labeled as tooling
17
+ [options.labelTypeTool, "tool"],
18
+ ]) {
19
+ if (labels.some((label) => label === labelType)) {
20
+ contributors.add(acceptedIssue.user?.login, contribution);
21
+ }
22
+ }
23
+ }
24
+ const mergedPulls = await collectMergedPulls(octokit);
25
+ // 💻 `computer`: all PR authors and co-authors
26
+ for (const mergedPull of mergedPulls) {
27
+ contributors.add(mergedPull.user?.login, "computer");
28
+ for (const coAuthor of mergedPull.body
29
+ ?.match(/co-authored-by:.+/gi)
30
+ ?.map((text) => text.match(/@(\S+)/)) ?? []) {
31
+ contributors.add(coAuthor?.[1], "computer");
32
+ }
33
+ }
34
+ // 🚧 `maintenance`: adding labels to issues and PRs, and merging PRs
35
+ const maintainers = new Set();
36
+ const issueEvents = await collectIssueEvents(octokit);
37
+ for (const event of issueEvents) {
38
+ if (event.actor) {
39
+ contributors.add(event.actor.login, "maintenance");
40
+ maintainers.add(event.actor.login);
41
+ }
42
+ }
43
+ // 👀 `review`: submitting a review for a PR
44
+ // (restricted just to users marked as maintainers)
45
+ const events = await collectEvents(octokit);
46
+ for (const event of events) {
47
+ if (event.type === "PullRequestReviewEvent" &&
48
+ maintainers.has(event.actor.login)) {
49
+ contributors.add(event.actor.login, "review");
50
+ }
51
+ }
52
+ return contributors.collect();
53
+ }
54
+ //# sourceMappingURL=collect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collect.js","sourceRoot":"","sources":["../../src/collect/collect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,MAAM,CAAC,KAAK,UAAU,OAAO,CAC5B,OAAgB,EAChB,OAA4C;IAE5C,MAAM,YAAY,GAAG,IAAI,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAEvE,MAAM,cAAc,GAAG,MAAM,qBAAqB,CACjD,OAAO,EACP,OAAO,CAAC,i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