@octokit/webhooks
Advanced tools
Comparing version 5.1.2 to 5.2.0
{ | ||
"name": "@octokit/webhooks", | ||
"version": "5.1.2", | ||
"version": "5.2.0", | ||
"publishConfig": { | ||
@@ -18,3 +18,4 @@ "access": "public" | ||
"devDependencies": { | ||
"@octokit/webhooks-definitions": "1.1.1", | ||
"@gimenete/type-writer": "^0.1.3", | ||
"@octokit/webhooks-definitions": "1.1.2", | ||
"axios": "^0.18.0", | ||
@@ -24,3 +25,5 @@ "cheerio": "^1.0.0-rc.2", | ||
"get-port": "^4.0.0", | ||
"pascal-case": "^2.0.1", | ||
"pify": "^4.0.0", | ||
"prettier": "^1.16.1", | ||
"proxyquire": "^2.0.0", | ||
@@ -30,2 +33,3 @@ "semantic-release": "^15.0.0", | ||
"standard": "^12.0.1", | ||
"table-builder": "^2.1.1", | ||
"tap": "^12.0.0" | ||
@@ -39,3 +43,4 @@ }, | ||
"test": "tap --100 --coverage 'test/**/*-test.js'", | ||
"semantic-release": "semantic-release" | ||
"semantic-release": "semantic-release", | ||
"generate-types": "node generate-types.js" | ||
}, | ||
@@ -48,3 +53,4 @@ "repository": { | ||
"author": "Gregor Martynus (https://twitter.com/gr2m)", | ||
"license": "MIT" | ||
"license": "MIT", | ||
"types": "index.d.ts" | ||
} |
296
README.md
@@ -505,258 +505,42 @@ # @octokit/webhooks | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Event</th> | ||
<th>Actions</th> | ||
</tr> | ||
</thead> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>commit_comment</code> | ||
</th> | ||
<td> | ||
<code>.created</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>create</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>delete</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>deployment</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>deployment_status</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>fork</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>gollum</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>installation</code> | ||
</th> | ||
<td> | ||
<code>.created</code><br><code>.deleted</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>installation_repositories</code> | ||
</th> | ||
<td> | ||
<code>.added</code><br><code>.removed</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>issue_comment</code> | ||
</th> | ||
<td> | ||
<code>.created</code><br><code>.edited</code><br><code>.deleted</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>issues</code> | ||
</th> | ||
<td> | ||
<code>.assigned</code><br><code>.unassigned</code><br><code>.labeled</code><br><code>.unlabeled</code><br><code>.opened</code><br><code>.edited</code><br><code>.milestoned</code><br><code>.demilestoned</code><br><code>.closed</code><br><code>.reopened</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>label</code> | ||
</th> | ||
<td> | ||
<code>.created</code><br><code>.edited</code><br><code>.deleted</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>marketplace_purchase</code> | ||
</th> | ||
<td> | ||
<code>.purchased</code><br><code>.cancelled</code><br><code>.changed</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>member</code> | ||
</th> | ||
<td> | ||
<code>.added</code><br><code>.edited</code><br><code>.deleted</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>membership</code> | ||
</th> | ||
<td> | ||
<code>.added</code><br><code>.removed</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>milestone</code> | ||
</th> | ||
<td> | ||
<code>.created</code><br><code>.closed</code><br><code>.opened</code><br><code>.edited</code><br><code>.deleted</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>org_block</code> | ||
</th> | ||
<td> | ||
<code>.blocked</code><br><code>.unblocked</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>organization</code> | ||
</th> | ||
<td> | ||
<code>.member_added</code><br><code>.member_removed</code><br><code>.member_invited</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>page_build</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>ping</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>project</code> | ||
</th> | ||
<td> | ||
<code>.created</code><br><code>.edited</code><br><code>.converted</code><br><code>.moved</code><br><code>.deleted</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>project_card</code> | ||
</th> | ||
<td> | ||
<code>.created</code><br><code>.edited</code><br><code>.closed</code><br><code>.reopened</code><br><code>.deleted</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>project_column</code> | ||
</th> | ||
<td> | ||
<code>.created</code><br><code>.edited</code><br><code>.moved</code><br><code>.deleted</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>public</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>pull_request</code> | ||
</th> | ||
<td> | ||
<code>.assigned</code><br><code>.unassigned</code><br><code>.review_requested</code><br><code>.review_request_removed</code><br><code>.labeled</code><br><code>.unlabeled</code><br><code>.opened</code><br><code>.edited</code><br><code>.closed</code><br><code>.reopened</code><br><code>.synchronize</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>pull_request_review</code> | ||
</th> | ||
<td> | ||
<code>.submitted</code><br><code>.edited</code><br><code>.dismissed</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>pull_request_review_comment</code> | ||
</th> | ||
<td> | ||
<code>.created</code><br><code>.edited</code><br><code>.deleted</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>push</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>release</code> | ||
</th> | ||
<td> | ||
<code>.published</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>repository</code> | ||
</th> | ||
<td> | ||
<code>.created</code><br><code>.deleted</code><br><code>.archived</code><br><code>.unarchived</code><br><code>.publicized</code><br><code>.privatized</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>status</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>team</code> | ||
</th> | ||
<td> | ||
<code>.created</code><br><code>.deleted</code><br><code>.edited</code><br><code>.added_to_repository</code><br><code>.removed_from_repository</code> | ||
</td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>team_add</code> | ||
</th> | ||
<td></td> | ||
</tr> | ||
<tr> | ||
<th align=left valign=top> | ||
<code>watch</code> | ||
</th> | ||
<td> | ||
<code>.started</code> | ||
</td> | ||
</tr> | ||
</table> | ||
<!-- autogenerated via scripts/update-known-events.js --><table ><thead><tr><th class="name-th">Event</th><th class="actions-th">Actions</th></tr></thead><tbody ><tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#checkrunevent"><code>check_run</code></a></td><td class="actions-td td_text"><code>completed</code><br><code>created</code><br><code>requested_action</code><br><code>rerequested</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#checksuiteevent"><code>check_suite</code></a></td><td class="actions-td td_text"><code>completed</code><br><code>requested</code><br><code>rerequested</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#commitcommentevent"><code>commit_comment</code></a></td><td class="actions-td td_text"><code>created</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#createevent"><code>create</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deleteevent"><code>delete</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deploymentevent"><code>deployment</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#deploymentstatusevent"><code>deployment_status</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#forkevent"><code>fork</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#githubappauthorizationevent"><code>github_app_authorization</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#gollumevent"><code>gollum</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#installationevent"><code>installation</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#installationrepositoriesevent"><code>installation_repositories</code></a></td><td class="actions-td td_text"><code>added</code><br><code>removed</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#issuecommentevent"><code>issue_comment</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#issuesevent"><code>issues</code></a></td><td class="actions-td td_text"><code>assigned</code><br><code>closed</code><br><code>deleted</code><br><code>demilestoned</code><br><code>edited</code><br><code>labeled</code><br><code>milestoned</code><br><code>opened</code><br><code>reopened</code><br><code>transferred</code><br><code>unassigned</code><br><code>unlabeled</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#labelevent"><code>label</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#marketplacepurchaseevent"><code>marketplace_purchase</code></a></td><td class="actions-td td_text"><code>cancelled</code><br><code>changed</code><br><code>pending_change</code><br><code>pending_change_cancelled</code><br><code>purchased</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#memberevent"><code>member</code></a></td><td class="actions-td td_text"><code>added</code><br><code>deleted</code><br><code>edited</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#membershipevent"><code>membership</code></a></td><td class="actions-td td_text"><code>added</code><br><code>removed</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#milestoneevent"><code>milestone</code></a></td><td class="actions-td td_text"><code>closed</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>opened</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#organizationevent"><code>organization</code></a></td><td class="actions-td td_text"><code>member_added</code><br><code>member_invited</code><br><code>member_removed</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#orgblockevent"><code>org_block</code></a></td><td class="actions-td td_text"><code>blocked</code><br><code>unblocked</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pagebuildevent"><code>page_build</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#projectcardevent"><code>project_card</code></a></td><td class="actions-td td_text"><code>converted</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>moved</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#projectcolumnevent"><code>project_column</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>moved</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#projectevent"><code>project</code></a></td><td class="actions-td td_text"><code>closed</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>reopened</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#publicevent"><code>public</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pullrequestevent"><code>pull_request</code></a></td><td class="actions-td td_text"><code>assigned</code><br><code>closed</code><br><code>edited</code><br><code>labeled</code><br><code>opened</code><br><code>reopened</code><br><code>review_request_removed</code><br><code>review_requested</code><br><code>unassigned</code><br><code>unlabeled</code><br><code>synchronize</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pullrequestreviewevent"><code>pull_request_review</code></a></td><td class="actions-td td_text"><code>dismissed</code><br><code>edited</code><br><code>submitted</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pullrequestreviewcommentevent"><code>pull_request_review_comment</code></a></td><td class="actions-td td_text"><code>created</code><br><code>deleted</code><br><code>edited</code></td></tr> | ||
<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> | ||
<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>published</code></td></tr> | ||
<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>privatized</code><br><code>publicized</code><br><code>unarchived</code></td></tr> | ||
<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> | ||
<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> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#securityadvisoryevent"><code>security_advisory</code></a></td><td class="actions-td td_text"><code>performed</code><br><code>published</code><br><code>updated</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#statusevent"><code>status</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#teamevent"><code>team</code></a></td><td class="actions-td td_text"><code>added_to_repository</code><br><code>created</code><br><code>deleted</code><br><code>edited</code><br><code>removed_from_repository</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#teamaddevent"><code>team_add</code></a></td><td class="actions-td td_num"></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#watchevent"><code>watch</code></a></td><td class="actions-td td_text"><code>started</code></td></tr> | ||
<tr ><td class="name-td td_text"><a href="https://developer.github.com/v3/activity/events/types/#pingevent"><code>ping</code></a></td><td class="actions-td td_num"></td></tr></tbody></table><!-- /autogenerated via scripts/update-known-events.js --> | ||
@@ -763,0 +547,0 @@ ### Special events |
@@ -1,5 +0,8 @@ | ||
const { writeFileSync } = require('fs') | ||
const { readFileSync, writeFileSync } = require('fs') | ||
const Table = require('table-builder') | ||
const WEBOOOKS = require('@octokit/webhooks-definitions') | ||
// update lib/webhook-names.json | ||
const newWebhookNames = WEBOOOKS.reduce((list, event) => { | ||
@@ -9,3 +12,26 @@ list.push(event.name, ...event.actions.map(action => `${event.name}.${action}`)) | ||
}, ['*', 'error']).sort() | ||
writeFileSync('lib/webhook-names.json', JSON.stringify([...newWebhookNames], null, 2) + '\n') | ||
writeFileSync('lib/webhook-names.json', JSON.stringify([...newWebhookNames], null, 2) + '\n') | ||
// update README.md | ||
const data = WEBOOOKS.map(w => { | ||
const link = `https://developer.github.com/v3/activity/events/types/#${w.name.replace(/[^a-z]/g, '')}event` | ||
return { | ||
name: `<a href="${link}"><code>${w.name}</code></a>`, | ||
actions: w.actions.map(action => `<code>${action}</code>`).join('<br>') | ||
} | ||
}) | ||
const headers = { name: 'Event', actions: 'Actions' } | ||
const tableHtml = new Table() | ||
.setHeaders(headers) | ||
.setData(data) | ||
.render() | ||
const readme = readFileSync('README.md').toString() | ||
const parts = readme.split(/<!-- \/?autogenerated via scripts\/update-known-events.js -->/) | ||
const newReadme = parts[0] + | ||
'<!-- autogenerated via scripts/update-known-events.js -->' + | ||
tableHtml + | ||
'<!-- /autogenerated via scripts/update-known-events.js -->' + | ||
parts[2] | ||
writeFileSync('README.md', newReadme) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
174531
41
5090
15
579
2
2