@octokit/webhooks 6.2.1 → 6.3.2

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.
package/README.md CHANGED
@@ -351,7 +351,7 @@ webhooks.on(eventNames, handler)
351
351
  </td>
352
352
  <td>
353
353
  <strong>Required.</strong>
354
- Name of the event. One of <a href="#listofalleventnames">GitHub’s supported event names</a>.
354
+ Name of the event. One of <a href="https://developer.github.com/webhooks/#events">GitHub's supported event names</a>.
355
355
  </td>
356
356
  </tr>
357
357
  <tr>
@@ -407,7 +407,7 @@ webhooks.removeListener(eventNames, handler)
407
407
  </td>
408
408
  <td>
409
409
  <strong>Required.</strong>
410
- Name of the event. One of <a href="#listofalleventnames">GitHub’s supported event names</a>.
410
+ Name of the event. One of <a href="https://developer.github.com/webhooks/#events">GitHub’s supported event names</a>.
411
411
  </td>
412
412
  </tr>
413
413
  <tr>
@@ -537,6 +537,7 @@ If there are actions for a webhook, events are emitted for both, the webhook nam
537
537
  <tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pushevent"><code>push</code></a></td><td class="actions-td td_num"></td></tr>
538
538
  <tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#registrypackageevent"><code>registry_package</code></a></td><td class="actions-td td_text"><code>published</code><br><code>updated</code></td></tr>
539
539
  <tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#releaseevent"><code>release</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>prereleased</code><br><code>published</code><br><code>unpublished</code></td></tr>
540
+ <tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositorydispatchevent"><code>repository_dispatch</code></a></td><td class="actions-td td_num"></td></tr>
540
541
  <tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositoryevent"><code>repository</code></a></td><td class="actions-td td_text"><code>archived</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>privatized</code><br><code>publicized</code><br><code>renamed</code><br><code>transferred</code><br><code>unarchived</code></td></tr>
541
542
  <tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositoryimportevent"><code>repository_import</code></a></td><td class="actions-td td_num"></td></tr>
542
543
  <tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#repositoryvulnerabilityalertevent"><code>repository_vulnerability_alert</code></a></td><td class="actions-td td_text"><code>create</code><br><code>dismiss</code><br><code>resolve</code></td></tr>
@@ -23,7 +23,7 @@ function receiverHandle (state, event) {
23
23
  }
24
24
 
25
25
  // flatten arrays of event listeners and remove undefined values
26
- let hooks = [].concat(
26
+ const hooks = [].concat(
27
27
  state.hooks[`${event.name}.${event.payload.action}`],
28
28
  state.hooks[event.name],
29
29
  state.hooks['*']
@@ -14,7 +14,7 @@ function receiverListener (state, webhookNameOrNames, handler) {
14
14
 
15
15
  // remove last hook that has been added, that way
16
16
  // it behaves the same as removeListener
17
- for (let i = state.hooks[webhookNameOrNames].length; i > 0; i--) {
17
+ for (let i = state.hooks[webhookNameOrNames].length - 1; i >= 0; i--) {
18
18
  if (state.hooks[webhookNameOrNames][i] === handler) {
19
19
  state.hooks[webhookNameOrNames].splice(i, 1)
20
20
  return
@@ -11,13 +11,13 @@ function wrapErrorHandler (handler, error) {
11
11
  try {
12
12
  returnValue = handler(error)
13
13
  } catch (error) {
14
- console.log(`FATAL: Error occured in "error" event handler`)
14
+ console.log('FATAL: Error occured in "error" event handler')
15
15
  console.log(error)
16
16
  }
17
17
 
18
18
  if (returnValue && returnValue.catch) {
19
19
  returnValue.catch(error => {
20
- console.log(`FATAL: Error occured in "error" event handler`)
20
+ console.log('FATAL: Error occured in "error" event handler')
21
21
  console.log(error)
22
22
  })
23
23
  }
package/index.d.ts CHANGED
@@ -79,6 +79,7 @@ declare namespace Webhooks {
79
79
  description: string;
80
80
  privacy: string;
81
81
  url: string;
82
+ html_url: string;
82
83
  members_url: string;
83
84
  repositories_url: string;
84
85
  permission: string;
@@ -136,6 +137,7 @@ declare namespace Webhooks {
136
137
  description: string;
137
138
  privacy: string;
138
139
  url: string;
140
+ html_url: string;
139
141
  members_url: string;
140
142
  repositories_url: string;
141
143
  permission: string;
@@ -171,6 +173,7 @@ declare namespace Webhooks {
171
173
  type WebhookPayloadStatusBranchesItem = {
172
174
  name: string;
173
175
  commit: WebhookPayloadStatusBranchesItemCommit;
176
+ protected: boolean;
174
177
  };
175
178
  type WebhookPayloadStatusCommitCommitter = {
176
179
  login: string;
@@ -332,7 +335,7 @@ declare namespace Webhooks {
332
335
  action: string;
333
336
  security_advisory: WebhookPayloadSecurityAdvisorySecurityAdvisory;
334
337
  };
335
- type WebhookPayloadRepositoryVulnerabilityAlertAlertDismisser = {
338
+ type WebhookPayloadRepositoryVulnerabilityAlertSender = {
336
339
  login: string;
337
340
  id: number;
338
341
  node_id: string;
@@ -359,13 +362,12 @@ declare namespace Webhooks {
359
362
  external_reference: string;
360
363
  external_identifier: string;
361
364
  fixed_in: string;
362
- dismisser: WebhookPayloadRepositoryVulnerabilityAlertAlertDismisser;
363
- dismiss_reason: string;
364
- dismissed_at: string;
365
365
  };
366
366
  type WebhookPayloadRepositoryVulnerabilityAlert = {
367
367
  action: string;
368
368
  alert: WebhookPayloadRepositoryVulnerabilityAlertAlert;
369
+ repository: PayloadRepository;
370
+ sender: WebhookPayloadRepositoryVulnerabilityAlertSender;
369
371
  };
370
372
  type WebhookPayloadRepositoryImportSender = {
371
373
  login: string;
@@ -432,6 +434,53 @@ declare namespace Webhooks {
432
434
  repository: PayloadRepository;
433
435
  sender: WebhookPayloadRepositorySender;
434
436
  };
437
+ type WebhookPayloadRepositoryDispatchInstallation = {
438
+ id: number;
439
+ node_id: string;
440
+ };
441
+ type WebhookPayloadRepositoryDispatchSender = {
442
+ login: string;
443
+ id: number;
444
+ node_id: string;
445
+ avatar_url: string;
446
+ gravatar_id: string;
447
+ url: string;
448
+ html_url: string;
449
+ followers_url: string;
450
+ following_url: string;
451
+ gists_url: string;
452
+ starred_url: string;
453
+ subscriptions_url: string;
454
+ organizations_url: string;
455
+ repos_url: string;
456
+ events_url: string;
457
+ received_events_url: string;
458
+ type: string;
459
+ site_admin: boolean;
460
+ };
461
+ type WebhookPayloadRepositoryDispatchOrganization = {
462
+ login: string;
463
+ id: number;
464
+ node_id: string;
465
+ url: string;
466
+ repos_url: string;
467
+ events_url: string;
468
+ hooks_url: string;
469
+ issues_url: string;
470
+ members_url: string;
471
+ public_members_url: string;
472
+ avatar_url: string;
473
+ description: string;
474
+ };
475
+ type WebhookPayloadRepositoryDispatch = {
476
+ action: string;
477
+ branch: string;
478
+ ref: string;
479
+ repository: PayloadRepository;
480
+ organization: WebhookPayloadRepositoryDispatchOrganization;
481
+ sender: WebhookPayloadRepositoryDispatchSender;
482
+ installation: WebhookPayloadRepositoryDispatchInstallation;
483
+ };
435
484
  type WebhookPayloadReleaseSender = {
436
485
  login: string;
437
486
  id: number;
@@ -498,7 +547,7 @@ declare namespace Webhooks {
498
547
  repository: PayloadRepository;
499
548
  sender: WebhookPayloadReleaseSender;
500
549
  };
501
- type WebhookPayloadRegistryPackagePayloadSender = {
550
+ type WebhookPayloadRegistryPackageSender = {
502
551
  login: string;
503
552
  id: number;
504
553
  node_id: string;
@@ -518,109 +567,14 @@ declare namespace Webhooks {
518
567
  type: string;
519
568
  site_admin: boolean;
520
569
  };
521
- type WebhookPayloadRegistryPackagePayloadRepositoryOwner = {
522
- login: string;
523
- id: number;
524
- node_id: string;
525
- avatar_url: string;
526
- gravatar_id: string;
527
- url: string;
528
- html_url: string;
529
- followers_url: string;
530
- following_url: string;
531
- gists_url: string;
532
- starred_url: string;
533
- subscriptions_url: string;
534
- organizations_url: string;
535
- repos_url: string;
536
- events_url: string;
537
- received_events_url: string;
538
- type: string;
539
- site_admin: boolean;
540
- };
541
- type WebhookPayloadRegistryPackagePayloadRepository = {
542
- id: number;
543
- node_id: string;
544
- name: string;
545
- full_name: string;
546
- private: boolean;
547
- owner: WebhookPayloadRegistryPackagePayloadRepositoryOwner;
548
- html_url: string;
549
- description: null;
550
- fork: boolean;
551
- url: string;
552
- forks_url: string;
553
- keys_url: string;
554
- collaborators_url: string;
555
- teams_url: string;
556
- hooks_url: string;
557
- issue_events_url: string;
558
- events_url: string;
559
- assignees_url: string;
560
- branches_url: string;
561
- tags_url: string;
562
- blobs_url: string;
563
- git_tags_url: string;
564
- git_refs_url: string;
565
- trees_url: string;
566
- statuses_url: string;
567
- languages_url: string;
568
- stargazers_url: string;
569
- contributors_url: string;
570
- subscribers_url: string;
571
- subscription_url: string;
572
- commits_url: string;
573
- git_commits_url: string;
574
- comments_url: string;
575
- issue_comment_url: string;
576
- contents_url: string;
577
- compare_url: string;
578
- merges_url: string;
579
- archive_url: string;
580
- downloads_url: string;
581
- issues_url: string;
582
- pulls_url: string;
583
- milestones_url: string;
584
- notifications_url: string;
585
- labels_url: string;
586
- releases_url: string;
587
- deployments_url: string;
588
- created_at: string;
589
- updated_at: string;
590
- pushed_at: string;
591
- git_url: string;
592
- ssh_url: string;
593
- clone_url: string;
594
- svn_url: string;
595
- homepage: null;
596
- size: number;
597
- stargazers_count: number;
598
- watchers_count: number;
599
- language: string;
600
- has_issues: boolean;
601
- has_projects: boolean;
602
- has_downloads: boolean;
603
- has_wiki: boolean;
604
- has_pages: boolean;
605
- forks_count: number;
606
- mirror_url: null;
607
- archived: boolean;
608
- disabled: boolean;
609
- open_issues_count: number;
610
- license: null;
611
- forks: number;
612
- open_issues: number;
613
- watchers: number;
614
- default_branch: string;
615
- };
616
- type WebhookPayloadRegistryPackagePayloadRegistryPackageRegistry = {
570
+ type WebhookPayloadRegistryPackageRegistryPackageRegistry = {
617
571
  about_url: string;
618
572
  name: string;
619
573
  type: string;
620
574
  url: string;
621
575
  vendor: string;
622
576
  };
623
- type WebhookPayloadRegistryPackagePayloadRegistryPackagePackageVersionAuthor = {
577
+ type WebhookPayloadRegistryPackageRegistryPackagePackageVersionAuthor = {
624
578
  login: string;
625
579
  id: number;
626
580
  node_id: string;
@@ -640,7 +594,7 @@ declare namespace Webhooks {
640
594
  type: string;
641
595
  site_admin: boolean;
642
596
  };
643
- type WebhookPayloadRegistryPackagePayloadRegistryPackagePackageVersionPackageFilesItem = {
597
+ type WebhookPayloadRegistryPackageRegistryPackagePackageVersionPackageFilesItem = {
644
598
  download_url: string;
645
599
  id: number;
646
600
  name: string;
@@ -653,7 +607,7 @@ declare namespace Webhooks {
653
607
  created_at: string;
654
608
  updated_at: string;
655
609
  };
656
- type WebhookPayloadRegistryPackagePayloadRegistryPackagePackageVersionReleaseAuthor = {
610
+ type WebhookPayloadRegistryPackageRegistryPackagePackageVersionReleaseAuthor = {
657
611
  login: string;
658
612
  id: number;
659
613
  node_id: string;
@@ -673,7 +627,7 @@ declare namespace Webhooks {
673
627
  type: string;
674
628
  site_admin: boolean;
675
629
  };
676
- type WebhookPayloadRegistryPackagePayloadRegistryPackagePackageVersionRelease = {
630
+ type WebhookPayloadRegistryPackageRegistryPackagePackageVersionRelease = {
677
631
  url: string;
678
632
  html_url: string;
679
633
  id: number;
@@ -681,18 +635,18 @@ declare namespace Webhooks {
681
635
  target_commitish: string;
682
636
  name: string;
683
637
  draft: boolean;
684
- author: WebhookPayloadRegistryPackagePayloadRegistryPackagePackageVersionReleaseAuthor;
638
+ author: WebhookPayloadRegistryPackageRegistryPackagePackageVersionReleaseAuthor;
685
639
  prerelease: boolean;
686
640
  created_at: string;
687
641
  published_at: string;
688
642
  };
689
- type WebhookPayloadRegistryPackagePayloadRegistryPackagePackageVersion = {
643
+ type WebhookPayloadRegistryPackageRegistryPackagePackageVersion = {
690
644
  id: number;
691
645
  version: string;
692
646
  summary: string;
693
647
  body: string;
694
648
  body_html: string;
695
- release: WebhookPayloadRegistryPackagePayloadRegistryPackagePackageVersionRelease;
649
+ release: WebhookPayloadRegistryPackageRegistryPackagePackageVersionRelease;
696
650
  manifest: string;
697
651
  html_url: string;
698
652
  tag_name: string;
@@ -704,12 +658,12 @@ declare namespace Webhooks {
704
658
  updated_at: string;
705
659
  metadata: Array<any>;
706
660
  package_files: Array<
707
- WebhookPayloadRegistryPackagePayloadRegistryPackagePackageVersionPackageFilesItem
661
+ WebhookPayloadRegistryPackageRegistryPackagePackageVersionPackageFilesItem
708
662
  >;
709
- author: WebhookPayloadRegistryPackagePayloadRegistryPackagePackageVersionAuthor;
663
+ author: WebhookPayloadRegistryPackageRegistryPackagePackageVersionAuthor;
710
664
  installation_command: string;
711
665
  };
712
- type WebhookPayloadRegistryPackagePayloadRegistryPackageOwner = {
666
+ type WebhookPayloadRegistryPackageRegistryPackageOwner = {
713
667
  login: string;
714
668
  id: number;
715
669
  node_id: string;
@@ -729,26 +683,22 @@ declare namespace Webhooks {
729
683
  type: string;
730
684
  site_admin: boolean;
731
685
  };
732
- type WebhookPayloadRegistryPackagePayloadRegistryPackage = {
686
+ type WebhookPayloadRegistryPackageRegistryPackage = {
733
687
  id: number;
734
688
  name: string;
735
689
  package_type: string;
736
690
  html_url: string;
737
691
  created_at: string;
738
692
  updated_at: string;
739
- owner: WebhookPayloadRegistryPackagePayloadRegistryPackageOwner;
740
- package_version: WebhookPayloadRegistryPackagePayloadRegistryPackagePackageVersion;
741
- registry: WebhookPayloadRegistryPackagePayloadRegistryPackageRegistry;
742
- };
743
- type WebhookPayloadRegistryPackagePayload = {
744
- action: string;
745
- registry_package: WebhookPayloadRegistryPackagePayloadRegistryPackage;
746
- repository: WebhookPayloadRegistryPackagePayloadRepository;
747
- sender: WebhookPayloadRegistryPackagePayloadSender;
693
+ owner: WebhookPayloadRegistryPackageRegistryPackageOwner;
694
+ package_version: WebhookPayloadRegistryPackageRegistryPackagePackageVersion;
695
+ registry: WebhookPayloadRegistryPackageRegistryPackageRegistry;
748
696
  };
749
697
  type WebhookPayloadRegistryPackage = {
750
- event: string;
751
- payload: WebhookPayloadRegistryPackagePayload;
698
+ action: string;
699
+ registry_package: WebhookPayloadRegistryPackageRegistryPackage;
700
+ repository: PayloadRepository;
701
+ sender: WebhookPayloadRegistryPackageSender;
752
702
  };
753
703
  type WebhookPayloadPushSender = {
754
704
  login: string;
@@ -865,8 +815,8 @@ declare namespace Webhooks {
865
815
  node_id: string;
866
816
  name: string;
867
817
  full_name: string;
868
- owner: WebhookPayloadPullRequestReviewCommentPullRequestBaseRepoOwner;
869
818
  private: boolean;
819
+ owner: WebhookPayloadPullRequestReviewCommentPullRequestBaseRepoOwner;
870
820
  html_url: string;
871
821
  description: null;
872
822
  fork: boolean;
@@ -918,7 +868,7 @@ declare namespace Webhooks {
918
868
  size: number;
919
869
  stargazers_count: number;
920
870
  watchers_count: number;
921
- language: null;
871
+ language: string;
922
872
  has_issues: boolean;
923
873
  has_projects: boolean;
924
874
  has_downloads: boolean;
@@ -927,6 +877,7 @@ declare namespace Webhooks {
927
877
  forks_count: number;
928
878
  mirror_url: null;
929
879
  archived: boolean;
880
+ disabled: boolean;
930
881
  open_issues_count: number;
931
882
  license: null;
932
883
  forks: number;
@@ -986,8 +937,8 @@ declare namespace Webhooks {
986
937
  node_id: string;
987
938
  name: string;
988
939
  full_name: string;
989
- owner: WebhookPayloadPullRequestReviewCommentPullRequestHeadRepoOwner;
990
940
  private: boolean;
941
+ owner: WebhookPayloadPullRequestReviewCommentPullRequestHeadRepoOwner;
991
942
  html_url: string;
992
943
  description: null;
993
944
  fork: boolean;
@@ -1039,7 +990,7 @@ declare namespace Webhooks {
1039
990
  size: number;
1040
991
  stargazers_count: number;
1041
992
  watchers_count: number;
1042
- language: null;
993
+ language: string;
1043
994
  has_issues: boolean;
1044
995
  has_projects: boolean;
1045
996
  has_downloads: boolean;
@@ -1048,6 +999,7 @@ declare namespace Webhooks {
1048
999
  forks_count: number;
1049
1000
  mirror_url: null;
1050
1001
  archived: boolean;
1002
+ disabled: boolean;
1051
1003
  open_issues_count: number;
1052
1004
  license: null;
1053
1005
  forks: number;
@@ -1271,8 +1223,8 @@ declare namespace Webhooks {
1271
1223
  node_id: string;
1272
1224
  name: string;
1273
1225
  full_name: string;
1274
- owner: WebhookPayloadPullRequestReviewPullRequestBaseRepoOwner;
1275
1226
  private: boolean;
1227
+ owner: WebhookPayloadPullRequestReviewPullRequestBaseRepoOwner;
1276
1228
  html_url: string;
1277
1229
  description: null;
1278
1230
  fork: boolean;
@@ -1324,7 +1276,7 @@ declare namespace Webhooks {
1324
1276
  size: number;
1325
1277
  stargazers_count: number;
1326
1278
  watchers_count: number;
1327
- language: null;
1279
+ language: string;
1328
1280
  has_issues: boolean;
1329
1281
  has_projects: boolean;
1330
1282
  has_downloads: boolean;
@@ -1333,6 +1285,7 @@ declare namespace Webhooks {
1333
1285
  forks_count: number;
1334
1286
  mirror_url: null;
1335
1287
  archived: boolean;
1288
+ disabled: boolean;
1336
1289
  open_issues_count: number;
1337
1290
  license: null;
1338
1291
  forks: number;
@@ -1392,8 +1345,8 @@ declare namespace Webhooks {
1392
1345
  node_id: string;
1393
1346
  name: string;
1394
1347
  full_name: string;
1395
- owner: WebhookPayloadPullRequestReviewPullRequestHeadRepoOwner;
1396
1348
  private: boolean;
1349
+ owner: WebhookPayloadPullRequestReviewPullRequestHeadRepoOwner;
1397
1350
  html_url: string;
1398
1351
  description: null;
1399
1352
  fork: boolean;
@@ -1445,7 +1398,7 @@ declare namespace Webhooks {
1445
1398
  size: number;
1446
1399
  stargazers_count: number;
1447
1400
  watchers_count: number;
1448
- language: null;
1401
+ language: string;
1449
1402
  has_issues: boolean;
1450
1403
  has_projects: boolean;
1451
1404
  has_downloads: boolean;
@@ -1454,6 +1407,7 @@ declare namespace Webhooks {
1454
1407
  forks_count: number;
1455
1408
  mirror_url: null;
1456
1409
  archived: boolean;
1410
+ disabled: boolean;
1457
1411
  open_issues_count: number;
1458
1412
  license: null;
1459
1413
  forks: number;
@@ -1656,8 +1610,8 @@ declare namespace Webhooks {
1656
1610
  node_id: string;
1657
1611
  name: string;
1658
1612
  full_name: string;
1659
- owner: WebhookPayloadPullRequestPullRequestBaseRepoOwner;
1660
1613
  private: boolean;
1614
+ owner: WebhookPayloadPullRequestPullRequestBaseRepoOwner;
1661
1615
  html_url: string;
1662
1616
  description: null;
1663
1617
  fork: boolean;
@@ -1718,6 +1672,7 @@ declare namespace Webhooks {
1718
1672
  forks_count: number;
1719
1673
  mirror_url: null;
1720
1674
  archived: boolean;
1675
+ disabled: boolean;
1721
1676
  open_issues_count: number;
1722
1677
  license: null;
1723
1678
  forks: number;
@@ -1777,8 +1732,8 @@ declare namespace Webhooks {
1777
1732
  node_id: string;
1778
1733
  name: string;
1779
1734
  full_name: string;
1780
- owner: WebhookPayloadPullRequestPullRequestHeadRepoOwner;
1781
1735
  private: boolean;
1736
+ owner: WebhookPayloadPullRequestPullRequestHeadRepoOwner;
1782
1737
  html_url: string;
1783
1738
  description: null;
1784
1739
  fork: boolean;
@@ -1839,6 +1794,7 @@ declare namespace Webhooks {
1839
1794
  forks_count: number;
1840
1795
  mirror_url: null;
1841
1796
  archived: boolean;
1797
+ disabled: boolean;
1842
1798
  open_issues_count: number;
1843
1799
  license: null;
1844
1800
  forks: number;
@@ -1909,9 +1865,9 @@ declare namespace Webhooks {
1909
1865
  body: string;
1910
1866
  created_at: string;
1911
1867
  updated_at: string;
1912
- closed_at: string;
1868
+ closed_at: null;
1913
1869
  merged_at: null;
1914
- merge_commit_sha: string;
1870
+ merge_commit_sha: null;
1915
1871
  assignee: null;
1916
1872
  assignees: Array<any>;
1917
1873
  requested_reviewers: Array<any>;
@@ -1927,10 +1883,10 @@ declare namespace Webhooks {
1927
1883
  base: WebhookPayloadPullRequestPullRequestBase;
1928
1884
  _links: WebhookPayloadPullRequestPullRequestLinks;
1929
1885
  author_association: string;
1930
- merged: boolean;
1931
1886
  draft: boolean;
1932
- mergeable: boolean;
1933
- rebaseable: boolean;
1887
+ merged: boolean;
1888
+ mergeable: null;
1889
+ rebaseable: null;
1934
1890
  mergeable_state: string;
1935
1891
  merged_by: null;
1936
1892
  comments: number;
@@ -2117,6 +2073,7 @@ declare namespace Webhooks {
2117
2073
  id: number;
2118
2074
  node_id: string;
2119
2075
  note: string;
2076
+ archived: boolean;
2120
2077
  creator: WebhookPayloadProjectCardProjectCardCreator;
2121
2078
  created_at: string;
2122
2079
  updated_at: string;
@@ -2439,6 +2396,7 @@ declare namespace Webhooks {
2439
2396
  description: string;
2440
2397
  privacy: string;
2441
2398
  url: string;
2399
+ html_url: string;
2442
2400
  members_url: string;
2443
2401
  repositories_url: string;
2444
2402
  permission: string;
@@ -2511,10 +2469,6 @@ declare namespace Webhooks {
2511
2469
  type: string;
2512
2470
  site_admin: boolean;
2513
2471
  };
2514
- type WebhookPayloadMemberChangesPermission = { from: string };
2515
- type WebhookPayloadMemberChanges = {
2516
- permission: WebhookPayloadMemberChangesPermission;
2517
- };
2518
2472
  type WebhookPayloadMemberMember = {
2519
2473
  login: string;
2520
2474
  id: number;
@@ -2538,7 +2492,6 @@ declare namespace Webhooks {
2538
2492
  type WebhookPayloadMember = {
2539
2493
  action: string;
2540
2494
  member: WebhookPayloadMemberMember;
2541
- changes: WebhookPayloadMemberChanges;
2542
2495
  repository: PayloadRepository;
2543
2496
  sender: WebhookPayloadMemberSender;
2544
2497
  };
@@ -2649,6 +2602,84 @@ declare namespace Webhooks {
2649
2602
  site_admin: boolean;
2650
2603
  };
2651
2604
  type WebhookPayloadIssuesChanges = {};
2605
+ type WebhookPayloadIssuesIssueMilestoneCreator = {
2606
+ login: string;
2607
+ id: number;
2608
+ node_id: string;
2609
+ avatar_url: string;
2610
+ gravatar_id: string;
2611
+ url: string;
2612
+ html_url: string;
2613
+ followers_url: string;
2614
+ following_url: string;
2615
+ gists_url: string;
2616
+ starred_url: string;
2617
+ subscriptions_url: string;
2618
+ organizations_url: string;
2619
+ repos_url: string;
2620
+ events_url: string;
2621
+ received_events_url: string;
2622
+ type: string;
2623
+ site_admin: boolean;
2624
+ };
2625
+ type WebhookPayloadIssuesIssueMilestone = {
2626
+ url: string;
2627
+ html_url: string;
2628
+ labels_url: string;
2629
+ id: number;
2630
+ node_id: string;
2631
+ number: number;
2632
+ title: string;
2633
+ description: string;
2634
+ creator: WebhookPayloadIssuesIssueMilestoneCreator;
2635
+ open_issues: number;
2636
+ closed_issues: number;
2637
+ state: string;
2638
+ created_at: string;
2639
+ updated_at: string;
2640
+ due_on: string;
2641
+ closed_at: string;
2642
+ };
2643
+ type WebhookPayloadIssuesIssueAssigneesItem = {
2644
+ login: string;
2645
+ id: number;
2646
+ node_id: string;
2647
+ avatar_url: string;
2648
+ gravatar_id: string;
2649
+ url: string;
2650
+ html_url: string;
2651
+ followers_url: string;
2652
+ following_url: string;
2653
+ gists_url: string;
2654
+ starred_url: string;
2655
+ subscriptions_url: string;
2656
+ organizations_url: string;
2657
+ repos_url: string;
2658
+ events_url: string;
2659
+ received_events_url: string;
2660
+ type: string;
2661
+ site_admin: boolean;
2662
+ };
2663
+ type WebhookPayloadIssuesIssueAssignee = {
2664
+ login: string;
2665
+ id: number;
2666
+ node_id: string;
2667
+ avatar_url: string;
2668
+ gravatar_id: string;
2669
+ url: string;
2670
+ html_url: string;
2671
+ followers_url: string;
2672
+ following_url: string;
2673
+ gists_url: string;
2674
+ starred_url: string;
2675
+ subscriptions_url: string;
2676
+ organizations_url: string;
2677
+ repos_url: string;
2678
+ events_url: string;
2679
+ received_events_url: string;
2680
+ type: string;
2681
+ site_admin: boolean;
2682
+ };
2652
2683
  type WebhookPayloadIssuesIssueLabelsItem = {
2653
2684
  id: number;
2654
2685
  node_id: string;
@@ -2692,9 +2723,9 @@ declare namespace Webhooks {
2692
2723
  labels: Array<WebhookPayloadIssuesIssueLabelsItem>;
2693
2724
  state: string;
2694
2725
  locked: boolean;
2695
- assignee: null;
2696
- assignees: Array<any>;
2697
- milestone: null;
2726
+ assignee: WebhookPayloadIssuesIssueAssignee;
2727
+ assignees: Array<WebhookPayloadIssuesIssueAssigneesItem>;
2728
+ milestone: WebhookPayloadIssuesIssueMilestone;
2698
2729
  comments: number;
2699
2730
  created_at: string;
2700
2731
  updated_at: string;
@@ -2761,6 +2792,84 @@ declare namespace Webhooks {
2761
2792
  author_association: string;
2762
2793
  body: string;
2763
2794
  };
2795
+ type WebhookPayloadIssueCommentIssueMilestoneCreator = {
2796
+ login: string;
2797
+ id: number;
2798
+ node_id: string;
2799
+ avatar_url: string;
2800
+ gravatar_id: string;
2801
+ url: string;
2802
+ html_url: string;
2803
+ followers_url: string;
2804
+ following_url: string;
2805
+ gists_url: string;
2806
+ starred_url: string;
2807
+ subscriptions_url: string;
2808
+ organizations_url: string;
2809
+ repos_url: string;
2810
+ events_url: string;
2811
+ received_events_url: string;
2812
+ type: string;
2813
+ site_admin: boolean;
2814
+ };
2815
+ type WebhookPayloadIssueCommentIssueMilestone = {
2816
+ url: string;
2817
+ html_url: string;
2818
+ labels_url: string;
2819
+ id: number;
2820
+ node_id: string;
2821
+ number: number;
2822
+ title: string;
2823
+ description: string;
2824
+ creator: WebhookPayloadIssueCommentIssueMilestoneCreator;
2825
+ open_issues: number;
2826
+ closed_issues: number;
2827
+ state: string;
2828
+ created_at: string;
2829
+ updated_at: string;
2830
+ due_on: string;
2831
+ closed_at: string;
2832
+ };
2833
+ type WebhookPayloadIssueCommentIssueAssigneesItem = {
2834
+ login: string;
2835
+ id: number;
2836
+ node_id: string;
2837
+ avatar_url: string;
2838
+ gravatar_id: string;
2839
+ url: string;
2840
+ html_url: string;
2841
+ followers_url: string;
2842
+ following_url: string;
2843
+ gists_url: string;
2844
+ starred_url: string;
2845
+ subscriptions_url: string;
2846
+ organizations_url: string;
2847
+ repos_url: string;
2848
+ events_url: string;
2849
+ received_events_url: string;
2850
+ type: string;
2851
+ site_admin: boolean;
2852
+ };
2853
+ type WebhookPayloadIssueCommentIssueAssignee = {
2854
+ login: string;
2855
+ id: number;
2856
+ node_id: string;
2857
+ avatar_url: string;
2858
+ gravatar_id: string;
2859
+ url: string;
2860
+ html_url: string;
2861
+ followers_url: string;
2862
+ following_url: string;
2863
+ gists_url: string;
2864
+ starred_url: string;
2865
+ subscriptions_url: string;
2866
+ organizations_url: string;
2867
+ repos_url: string;
2868
+ events_url: string;
2869
+ received_events_url: string;
2870
+ type: string;
2871
+ site_admin: boolean;
2872
+ };
2764
2873
  type WebhookPayloadIssueCommentIssueLabelsItem = {
2765
2874
  id: number;
2766
2875
  node_id: string;
@@ -2804,9 +2913,9 @@ declare namespace Webhooks {
2804
2913
  labels: Array<WebhookPayloadIssueCommentIssueLabelsItem>;
2805
2914
  state: string;
2806
2915
  locked: boolean;
2807
- assignee: null;
2808
- assignees: Array<any>;
2809
- milestone: null;
2916
+ assignee: WebhookPayloadIssueCommentIssueAssignee;
2917
+ assignees: Array<WebhookPayloadIssueCommentIssueAssigneesItem>;
2918
+ milestone: WebhookPayloadIssueCommentIssueMilestone;
2810
2919
  comments: number;
2811
2920
  created_at: string;
2812
2921
  updated_at: string;
@@ -2841,16 +2950,26 @@ declare namespace Webhooks {
2841
2950
  type: string;
2842
2951
  site_admin: boolean;
2843
2952
  };
2844
- type WebhookPayloadInstallationRepositoriesRepositoriesRemovedItem = {
2953
+ type WebhookPayloadInstallationRepositoriesRepositoriesAddedItem = {
2845
2954
  id: number;
2955
+ node_id: string;
2846
2956
  name: string;
2847
2957
  full_name: string;
2848
2958
  private: boolean;
2849
2959
  };
2850
2960
  type WebhookPayloadInstallationRepositoriesInstallationPermissions = {
2851
- metadata: string;
2852
- contents: string;
2961
+ administration: string;
2962
+ statuses: string;
2963
+ repository_projects: string;
2964
+ repository_hooks: string;
2965
+ pull_requests: string;
2966
+ pages: string;
2853
2967
  issues: string;
2968
+ deployments: string;
2969
+ contents: string;
2970
+ checks: string;
2971
+ metadata: string;
2972
+ vulnerability_alerts: string;
2854
2973
  };
2855
2974
  type WebhookPayloadInstallationRepositoriesInstallationAccount = {
2856
2975
  login: string;
@@ -2883,19 +3002,19 @@ declare namespace Webhooks {
2883
3002
  target_id: number;
2884
3003
  target_type: string;
2885
3004
  permissions: WebhookPayloadInstallationRepositoriesInstallationPermissions;
2886
- events: Array<string>;
3005
+ events: Array<any>;
2887
3006
  created_at: number;
2888
3007
  updated_at: number;
2889
- single_file_name: string;
3008
+ single_file_name: null;
2890
3009
  };
2891
3010
  type WebhookPayloadInstallationRepositories = {
2892
3011
  action: string;
2893
3012
  installation: WebhookPayloadInstallationRepositoriesInstallation;
2894
3013
  repository_selection: string;
2895
- repositories_added: Array<any>;
2896
- repositories_removed: Array<
2897
- WebhookPayloadInstallationRepositoriesRepositoriesRemovedItem
3014
+ repositories_added: Array<
3015
+ WebhookPayloadInstallationRepositoriesRepositoriesAddedItem
2898
3016
  >;
3017
+ repositories_removed: Array<any>;
2899
3018
  sender: WebhookPayloadInstallationRepositoriesSender;
2900
3019
  };
2901
3020
  type WebhookPayloadInstallationSender = {
@@ -3073,8 +3192,8 @@ declare namespace Webhooks {
3073
3192
  node_id: string;
3074
3193
  name: string;
3075
3194
  full_name: string;
3076
- owner: WebhookPayloadForkForkeeOwner;
3077
3195
  private: boolean;
3196
+ owner: WebhookPayloadForkForkeeOwner;
3078
3197
  html_url: string;
3079
3198
  description: null;
3080
3199
  fork: boolean;
@@ -3135,6 +3254,7 @@ declare namespace Webhooks {
3135
3254
  forks_count: number;
3136
3255
  mirror_url: null;
3137
3256
  archived: boolean;
3257
+ disabled: boolean;
3138
3258
  open_issues_count: number;
3139
3259
  license: null;
3140
3260
  forks: number;
@@ -3197,6 +3317,7 @@ declare namespace Webhooks {
3197
3317
  ref: string;
3198
3318
  task: string;
3199
3319
  payload: WebhookPayloadDeploymentStatusDeploymentPayload;
3320
+ original_environment: string;
3200
3321
  environment: string;
3201
3322
  description: null;
3202
3323
  creator: WebhookPayloadDeploymentStatusDeploymentCreator;
@@ -3232,6 +3353,7 @@ declare namespace Webhooks {
3232
3353
  state: string;
3233
3354
  creator: WebhookPayloadDeploymentStatusDeploymentStatusCreator;
3234
3355
  description: string;
3356
+ environment: string;
3235
3357
  target_url: string;
3236
3358
  created_at: string;
3237
3359
  updated_at: string;
@@ -3293,6 +3415,7 @@ declare namespace Webhooks {
3293
3415
  ref: string;
3294
3416
  task: string;
3295
3417
  payload: WebhookPayloadDeploymentDeploymentPayload;
3418
+ original_environment: string;
3296
3419
  environment: string;
3297
3420
  description: null;
3298
3421
  creator: WebhookPayloadDeploymentDeploymentCreator;
@@ -3494,7 +3617,6 @@ declare namespace Webhooks {
3494
3617
  repository: PayloadRepository;
3495
3618
  sender: WebhookPayloadCommitCommentSender;
3496
3619
  };
3497
- type WebhookPayloadCheckSuiteInstallation = { id: number };
3498
3620
  type WebhookPayloadCheckSuiteSender = {
3499
3621
  login: string;
3500
3622
  id: number;
@@ -3515,20 +3637,6 @@ declare namespace Webhooks {
3515
3637
  type: string;
3516
3638
  site_admin: boolean;
3517
3639
  };
3518
- type WebhookPayloadCheckSuiteOrganization = {
3519
- login: string;
3520
- id: number;
3521
- node_id: string;
3522
- url: string;
3523
- repos_url: string;
3524
- events_url: string;
3525
- hooks_url: string;
3526
- issues_url: string;
3527
- members_url: string;
3528
- public_members_url: string;
3529
- avatar_url: string;
3530
- description: string;
3531
- };
3532
3640
  type WebhookPayloadCheckSuiteCheckSuiteHeadCommitCommitter = {
3533
3641
  name: string;
3534
3642
  email: string;
@@ -3545,6 +3653,27 @@ declare namespace Webhooks {
3545
3653
  author: WebhookPayloadCheckSuiteCheckSuiteHeadCommitAuthor;
3546
3654
  committer: WebhookPayloadCheckSuiteCheckSuiteHeadCommitCommitter;
3547
3655
  };
3656
+ type WebhookPayloadCheckSuiteCheckSuiteAppPermissions = {
3657
+ administration: string;
3658
+ checks: string;
3659
+ contents: string;
3660
+ deployments: string;
3661
+ issues: string;
3662
+ members: string;
3663
+ metadata: string;
3664
+ organization_administration: string;
3665
+ organization_hooks: string;
3666
+ organization_plan: string;
3667
+ organization_projects: string;
3668
+ organization_user_blocking: string;
3669
+ pages: string;
3670
+ pull_requests: string;
3671
+ repository_hooks: string;
3672
+ repository_projects: string;
3673
+ statuses: string;
3674
+ team_discussions: string;
3675
+ vulnerability_alerts: string;
3676
+ };
3548
3677
  type WebhookPayloadCheckSuiteCheckSuiteAppOwner = {
3549
3678
  login: string;
3550
3679
  id: number;
@@ -3570,14 +3699,44 @@ declare namespace Webhooks {
3570
3699
  node_id: string;
3571
3700
  owner: WebhookPayloadCheckSuiteCheckSuiteAppOwner;
3572
3701
  name: string;
3573
- description: null;
3702
+ description: string;
3574
3703
  external_url: string;
3575
3704
  html_url: string;
3576
3705
  created_at: string;
3577
3706
  updated_at: string;
3707
+ permissions: WebhookPayloadCheckSuiteCheckSuiteAppPermissions;
3708
+ events: Array<any>;
3709
+ };
3710
+ type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBaseRepo = {
3711
+ id: number;
3712
+ url: string;
3713
+ name: string;
3714
+ };
3715
+ type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBase = {
3716
+ ref: string;
3717
+ sha: string;
3718
+ repo: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBaseRepo;
3719
+ };
3720
+ type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHeadRepo = {
3721
+ id: number;
3722
+ url: string;
3723
+ name: string;
3724
+ };
3725
+ type WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHead = {
3726
+ ref: string;
3727
+ sha: string;
3728
+ repo: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHeadRepo;
3729
+ };
3730
+ type WebhookPayloadCheckSuiteCheckSuitePullRequestsItem = {
3731
+ url: string;
3732
+ id: number;
3733
+ number: number;
3734
+ head: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemHead;
3735
+ base: WebhookPayloadCheckSuiteCheckSuitePullRequestsItemBase;
3578
3736
  };
3579
3737
  type WebhookPayloadCheckSuiteCheckSuite = {
3580
3738
  id: number;
3739
+ node_id: string;
3581
3740
  head_branch: string;
3582
3741
  head_sha: string;
3583
3742
  status: string;
@@ -3585,7 +3744,7 @@ declare namespace Webhooks {
3585
3744
  url: string;
3586
3745
  before: string;
3587
3746
  after: string;
3588
- pull_requests: Array<any>;
3747
+ pull_requests: Array<WebhookPayloadCheckSuiteCheckSuitePullRequestsItem>;
3589
3748
  app: WebhookPayloadCheckSuiteCheckSuiteApp;
3590
3749
  created_at: string;
3591
3750
  updated_at: string;
@@ -3597,11 +3756,8 @@ declare namespace Webhooks {
3597
3756
  action: string;
3598
3757
  check_suite: WebhookPayloadCheckSuiteCheckSuite;
3599
3758
  repository: PayloadRepository;
3600
- organization: WebhookPayloadCheckSuiteOrganization;
3601
3759
  sender: WebhookPayloadCheckSuiteSender;
3602
- installation: WebhookPayloadCheckSuiteInstallation;
3603
3760
  };
3604
- type WebhookPayloadCheckRunInstallation = { id: number };
3605
3761
  type WebhookPayloadCheckRunSender = {
3606
3762
  login: string;
3607
3763
  id: number;
@@ -3622,20 +3778,6 @@ declare namespace Webhooks {
3622
3778
  type: string;
3623
3779
  site_admin: boolean;
3624
3780
  };
3625
- type WebhookPayloadCheckRunOrganization = {
3626
- login: string;
3627
- id: number;
3628
- node_id: string;
3629
- url: string;
3630
- repos_url: string;
3631
- events_url: string;
3632
- hooks_url: string;
3633
- issues_url: string;
3634
- members_url: string;
3635
- public_members_url: string;
3636
- avatar_url: string;
3637
- description: string;
3638
- };
3639
3781
  type PayloadRepositoryOwner = {
3640
3782
  login: string;
3641
3783
  id: number;
@@ -3663,10 +3805,10 @@ declare namespace Webhooks {
3663
3805
  node_id: string;
3664
3806
  name: string;
3665
3807
  full_name: string;
3666
- owner: PayloadRepositoryOwner;
3667
3808
  private: boolean;
3809
+ owner: PayloadRepositoryOwner;
3668
3810
  html_url: string;
3669
- description: null;
3811
+ description: null | string;
3670
3812
  fork: boolean;
3671
3813
  url: string;
3672
3814
  forks_url: string;
@@ -3712,11 +3854,11 @@ declare namespace Webhooks {
3712
3854
  ssh_url: string;
3713
3855
  clone_url: string;
3714
3856
  svn_url: string;
3715
- homepage: null;
3857
+ homepage: null | string;
3716
3858
  size: number;
3717
3859
  stargazers_count: number;
3718
3860
  watchers_count: number;
3719
- language: null;
3861
+ language: string | null;
3720
3862
  has_issues: boolean;
3721
3863
  has_projects: boolean;
3722
3864
  has_downloads: boolean;
@@ -3725,6 +3867,7 @@ declare namespace Webhooks {
3725
3867
  forks_count: number;
3726
3868
  mirror_url: null;
3727
3869
  archived: boolean;
3870
+ disabled?: boolean;
3728
3871
  open_issues_count: number;
3729
3872
  license: null;
3730
3873
  forks: number;
@@ -3735,6 +3878,54 @@ declare namespace Webhooks {
3735
3878
  master_branch?: string;
3736
3879
  permissions?: PayloadRepositoryPermissions;
3737
3880
  };
3881
+ type WebhookPayloadCheckRunCheckRunPullRequestsItemBaseRepo = {
3882
+ id: number;
3883
+ url: string;
3884
+ name: string;
3885
+ };
3886
+ type WebhookPayloadCheckRunCheckRunPullRequestsItemBase = {
3887
+ ref: string;
3888
+ sha: string;
3889
+ repo: WebhookPayloadCheckRunCheckRunPullRequestsItemBaseRepo;
3890
+ };
3891
+ type WebhookPayloadCheckRunCheckRunPullRequestsItemHeadRepo = {
3892
+ id: number;
3893
+ url: string;
3894
+ name: string;
3895
+ };
3896
+ type WebhookPayloadCheckRunCheckRunPullRequestsItemHead = {
3897
+ ref: string;
3898
+ sha: string;
3899
+ repo: WebhookPayloadCheckRunCheckRunPullRequestsItemHeadRepo;
3900
+ };
3901
+ type WebhookPayloadCheckRunCheckRunPullRequestsItem = {
3902
+ url: string;
3903
+ id: number;
3904
+ number: number;
3905
+ head: WebhookPayloadCheckRunCheckRunPullRequestsItemHead;
3906
+ base: WebhookPayloadCheckRunCheckRunPullRequestsItemBase;
3907
+ };
3908
+ type WebhookPayloadCheckRunCheckRunAppPermissions = {
3909
+ administration: string;
3910
+ checks: string;
3911
+ contents: string;
3912
+ deployments: string;
3913
+ issues: string;
3914
+ members: string;
3915
+ metadata: string;
3916
+ organization_administration: string;
3917
+ organization_hooks: string;
3918
+ organization_plan: string;
3919
+ organization_projects: string;
3920
+ organization_user_blocking: string;
3921
+ pages: string;
3922
+ pull_requests: string;
3923
+ repository_hooks: string;
3924
+ repository_projects: string;
3925
+ statuses: string;
3926
+ team_discussions: string;
3927
+ vulnerability_alerts: string;
3928
+ };
3738
3929
  type WebhookPayloadCheckRunCheckRunAppOwner = {
3739
3930
  login: string;
3740
3931
  id: number;
@@ -3760,11 +3951,34 @@ declare namespace Webhooks {
3760
3951
  node_id: string;
3761
3952
  owner: WebhookPayloadCheckRunCheckRunAppOwner;
3762
3953
  name: string;
3763
- description: null;
3954
+ description: string;
3764
3955
  external_url: string;
3765
3956
  html_url: string;
3766
3957
  created_at: string;
3767
3958
  updated_at: string;
3959
+ permissions: WebhookPayloadCheckRunCheckRunAppPermissions;
3960
+ events: Array<any>;
3961
+ };
3962
+ type WebhookPayloadCheckRunCheckRunCheckSuiteAppPermissions = {
3963
+ administration: string;
3964
+ checks: string;
3965
+ contents: string;
3966
+ deployments: string;
3967
+ issues: string;
3968
+ members: string;
3969
+ metadata: string;
3970
+ organization_administration: string;
3971
+ organization_hooks: string;
3972
+ organization_plan: string;
3973
+ organization_projects: string;
3974
+ organization_user_blocking: string;
3975
+ pages: string;
3976
+ pull_requests: string;
3977
+ repository_hooks: string;
3978
+ repository_projects: string;
3979
+ statuses: string;
3980
+ team_discussions: string;
3981
+ vulnerability_alerts: string;
3768
3982
  };
3769
3983
  type WebhookPayloadCheckRunCheckRunCheckSuiteAppOwner = {
3770
3984
  login: string;
@@ -3791,56 +4005,88 @@ declare namespace Webhooks {
3791
4005
  node_id: string;
3792
4006
  owner: WebhookPayloadCheckRunCheckRunCheckSuiteAppOwner;
3793
4007
  name: string;
3794
- description: null;
4008
+ description: string;
3795
4009
  external_url: string;
3796
4010
  html_url: string;
3797
4011
  created_at: string;
3798
4012
  updated_at: string;
4013
+ permissions: WebhookPayloadCheckRunCheckRunCheckSuiteAppPermissions;
4014
+ events: Array<any>;
4015
+ };
4016
+ type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBaseRepo = {
4017
+ id: number;
4018
+ url: string;
4019
+ name: string;
4020
+ };
4021
+ type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBase = {
4022
+ ref: string;
4023
+ sha: string;
4024
+ repo: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBaseRepo;
4025
+ };
4026
+ type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHeadRepo = {
4027
+ id: number;
4028
+ url: string;
4029
+ name: string;
4030
+ };
4031
+ type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHead = {
4032
+ ref: string;
4033
+ sha: string;
4034
+ repo: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHeadRepo;
4035
+ };
4036
+ type WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItem = {
4037
+ url: string;
4038
+ id: number;
4039
+ number: number;
4040
+ head: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemHead;
4041
+ base: WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItemBase;
3799
4042
  };
3800
4043
  type WebhookPayloadCheckRunCheckRunCheckSuite = {
3801
4044
  id: number;
4045
+ node_id: string;
3802
4046
  head_branch: string;
3803
4047
  head_sha: string;
3804
4048
  status: string;
3805
- conclusion: string;
4049
+ conclusion: null;
3806
4050
  url: string;
3807
4051
  before: string;
3808
4052
  after: string;
3809
- pull_requests: Array<any>;
4053
+ pull_requests: Array<
4054
+ WebhookPayloadCheckRunCheckRunCheckSuitePullRequestsItem
4055
+ >;
3810
4056
  app: WebhookPayloadCheckRunCheckRunCheckSuiteApp;
3811
4057
  created_at: string;
3812
4058
  updated_at: string;
3813
4059
  };
3814
4060
  type WebhookPayloadCheckRunCheckRunOutput = {
3815
- title: string;
3816
- summary: string;
3817
- text: string;
4061
+ title: null;
4062
+ summary: null;
4063
+ text: null;
3818
4064
  annotations_count: number;
3819
4065
  annotations_url: string;
3820
4066
  };
3821
4067
  type WebhookPayloadCheckRunCheckRun = {
3822
4068
  id: number;
4069
+ node_id: string;
3823
4070
  head_sha: string;
3824
4071
  external_id: string;
3825
4072
  url: string;
3826
4073
  html_url: string;
4074
+ details_url: string;
3827
4075
  status: string;
3828
- conclusion: string;
4076
+ conclusion: null;
3829
4077
  started_at: string;
3830
- completed_at: string;
4078
+ completed_at: null;
3831
4079
  output: WebhookPayloadCheckRunCheckRunOutput;
3832
4080
  name: string;
3833
4081
  check_suite: WebhookPayloadCheckRunCheckRunCheckSuite;
3834
4082
  app: WebhookPayloadCheckRunCheckRunApp;
3835
- pull_requests: Array<any>;
4083
+ pull_requests: Array<WebhookPayloadCheckRunCheckRunPullRequestsItem>;
3836
4084
  };
3837
4085
  type WebhookPayloadCheckRun = {
3838
4086
  action: string;
3839
4087
  check_run: WebhookPayloadCheckRunCheckRun;
3840
4088
  repository: PayloadRepository;
3841
- organization: WebhookPayloadCheckRunOrganization;
3842
4089
  sender: WebhookPayloadCheckRunSender;
3843
- installation: WebhookPayloadCheckRunInstallation;
3844
4090
  };
3845
4091
 
3846
4092
  interface WebhookEvent<T> {
@@ -4218,6 +4464,13 @@ declare class Webhooks {
4218
4464
  ) => Promise<void> | void
4219
4465
  ): void;
4220
4466
 
4467
+ public on(
4468
+ event: "repository_dispatch",
4469
+ callback: (
4470
+ event: Webhooks.WebhookEvent<Webhooks.WebhookPayloadRepositoryDispatch>
4471
+ ) => Promise<void> | void
4472
+ ): void;
4473
+
4221
4474
  public on(
4222
4475
  event:
4223
4476
  | "repository"
@@ -149,6 +149,7 @@
149
149
  "repository.renamed",
150
150
  "repository.transferred",
151
151
  "repository.unarchived",
152
+ "repository_dispatch",
152
153
  "repository_import",
153
154
  "repository_vulnerability_alert",
154
155
  "repository_vulnerability_alert.create",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octokit/webhooks",
3
- "version": "6.2.1",
3
+ "version": "6.3.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "@gimenete/type-writer": "^0.1.3",
18
- "@octokit/webhooks-definitions": "1.4.1",
19
- "axios": "^0.18.0",
18
+ "@octokit/webhooks-definitions": "1.5.1",
19
+ "axios": "^0.19.0",
20
20
  "cheerio": "^1.0.0-rc.2",
21
21
  "coveralls": "^3.0.3",
22
22
  "get-port": "^5.0.0",
@@ -24,11 +24,11 @@
24
24
  "pify": "^4.0.0",
25
25
  "prettier": "^1.16.1",
26
26
  "proxyquire": "^2.0.0",
27
- "semantic-release": "^15.13.8",
27
+ "semantic-release": "^15.13.24",
28
28
  "simple-mock": "^0.8.0",
29
- "standard": "^12.0.1",
29
+ "standard": "^14.0.2",
30
30
  "table-builder": "^2.1.1",
31
- "tap": "^13.0.3"
31
+ "tap": "^14.0.0"
32
32
  },
33
33
  "scripts": {
34
34
  "coverage": "tap --coverage-report=html && open coverage/lcov-report/index.html",
package/sign/index.js CHANGED
@@ -12,7 +12,7 @@ function sign (secret, payload) {
12
12
  }
13
13
 
14
14
  function toNormalizedJsonString (payload) {
15
- return JSON.stringify(payload).replace(/\\u[\da-f]{4}/g, s => {
16
- return s.substr(0, 2) + s.substr(2).toUpperCase()
15
+ return JSON.stringify(payload).replace(/[^\\]\\u[\da-f]{4}/g, s => {
16
+ return s.substr(0, 3) + s.substr(3).toUpperCase()
17
17
  })
18
18
  }
@@ -59,6 +59,10 @@ test('verify(secret, eventPayload, signature) returns true if eventPayload conta
59
59
  foo: 'Foo\n\u001B[34mbar: ♥♥♥♥♥♥♥♥\nthis-is-lost\u001B[0m\u001B[2K'
60
60
  }, 'sha1=7316ec5e7866e42e4aba4af550d21a5f036f949d')
61
61
  t.is(signatureMatchesUpperCaseSequence, true)
62
+ const signatureMatchesEscapedSequence = verify('development', {
63
+ foo: '\\u001b'
64
+ }, 'sha1=2c440a176f4cb84c8c921dfee882d594c2465097')
65
+ t.is(signatureMatchesEscapedSequence, true)
62
66
 
63
67
  t.end()
64
68
  })
@@ -0,0 +1,42 @@
1
+ const test = require('tap').test
2
+
3
+ const removeListener = require('../../event-handler/remove-listener')
4
+
5
+ test('remove-listener: single listener', t => {
6
+ const push = () => {}
7
+
8
+ const state = {
9
+ hooks: {
10
+ push: [push]
11
+ }
12
+ }
13
+
14
+ t.doesNotThrow(() => {
15
+ removeListener(state, 'push', push)
16
+ })
17
+ t.deepEqual(state, { hooks: { push: [] } })
18
+ t.end()
19
+ })
20
+
21
+ test('remove-listener: multiple listeners', t => {
22
+ const push1 = () => {}
23
+ const push2 = () => {}
24
+ const push3 = () => {}
25
+
26
+ const ping = () => {}
27
+
28
+ const state = {
29
+ hooks: {
30
+ push: [push1, push2, push3],
31
+ ping: [ping]
32
+ }
33
+ }
34
+
35
+ t.doesNotThrow(() => {
36
+ removeListener(state, 'push', push1)
37
+ removeListener(state, 'push', push2)
38
+ removeListener(state, 'push', push3)
39
+ })
40
+ t.deepEqual(state, { hooks: { push: [], ping: [ping] } })
41
+ t.end()
42
+ })