Skip to content

Commit bff3b74

Browse files
committed
fix: remove obsolete and invalid events & actions
1 parent f66a852 commit bff3b74

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

lib/webhook-names.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,12 @@
1111
"check_suite.rerequested",
1212
"commit_comment",
1313
"commit_comment.created",
14-
"content_reference",
1514
"create",
1615
"delete",
1716
"deployment",
1817
"deployment_status",
19-
"download",
2018
"error",
21-
"follow",
2219
"fork",
23-
"fork_apply",
24-
"gist",
2520
"github_app_authorization",
2621
"gollum",
2722
"installation",
@@ -81,20 +76,16 @@
8176
"ping",
8277
"project",
8378
"project.closed",
84-
"project.converted",
8579
"project.created",
8680
"project.deleted",
8781
"project.edited",
88-
"project.moved",
8982
"project.reopened",
9083
"project_card",
91-
"project_card.closed",
9284
"project_card.converted",
9385
"project_card.created",
9486
"project_card.deleted",
9587
"project_card.edited",
9688
"project_card.moved",
97-
"project_card.reopened",
9889
"project_column",
9990
"project_column.created",
10091
"project_column.deleted",
@@ -105,15 +96,12 @@
10596
"pull_request.assigned",
10697
"pull_request.closed",
10798
"pull_request.edited",
108-
"pull_request.false",
10999
"pull_request.labeled",
110-
"pull_request.merged",
111100
"pull_request.opened",
112101
"pull_request.reopened",
113102
"pull_request.review_request_removed",
114103
"pull_request.review_requested",
115104
"pull_request.synchronize",
116-
"pull_request.true",
117105
"pull_request.unassigned",
118106
"pull_request.unlabeled",
119107
"pull_request_review",

scripts/update-known-events.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ const WEBOOOKS = require('@octokit/webhooks-definitions')
55
const newWebhookNames = WEBOOOKS.reduce((list, event) => {
66
list.push(event.name, ...event.actions.map(action => `${event.name}.${action}`))
77
return list
8-
}, ['*', 'error'])
8+
}, ['*', 'error']).sort()
99

10-
// the documentation at https://developer.github.com/v3/activity/events/types/#labelevent
11-
// does not include all actions, or the actions are not formatted correctly.
12-
// So for the time being we merge into the current webhook names to prevent
13-
// events or actions from being removed
14-
const currentWebhookNames = require('../lib/webhook-names')
15-
const webhookNames = new Set(newWebhookNames.concat(currentWebhookNames).sort())
16-
17-
writeFileSync('lib/webhook-names.json', JSON.stringify([...webhookNames], null, 2) + '\n')
10+
writeFileSync('lib/webhook-names.json', JSON.stringify([...newWebhookNames], null, 2) + '\n')

0 commit comments

Comments
 (0)