feat(plugin-scaffolder-backend): Validate webhook event names

Webhook event names are validated against Octokit Webhooks `emitterEventNames`. Note `emitterEventNames` contains event/action combinations as well that are comma delimited. Therefore, extracting strings without '.' provides list of all events.

"@octokit/webhooks" version 9.14.0 is the minimum requirement because this is a version where I introduced exported `emitterEventNames` to be used here.

Signed-off-by: @pawelmitka <pawel.mitka@brainly.com>
This commit is contained in:
@pawelmitka
2021-09-06 13:00:39 +02:00
parent 88f1597175
commit 21ccd49970
6 changed files with 102 additions and 5 deletions
+1
View File
@@ -39,6 +39,7 @@
"@gitbeaker/core": "^30.2.0",
"@gitbeaker/node": "^30.2.0",
"@octokit/rest": "^18.5.3",
"@octokit/webhooks": "^9.14.1",
"@types/express": "^4.17.6",
"azure-devops-node-api": "^11.0.1",
"command-exists": "^1.2.9",