mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-10 18:44:19 +00:00
node_modules
This commit is contained in:
parent
0e414c630a
commit
78c309ef59
555 changed files with 103819 additions and 1 deletions
22
node_modules/@octokit/plugin-throttling/scripts/generate-routes.js
generated
vendored
Normal file
22
node_modules/@octokit/plugin-throttling/scripts/generate-routes.js
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* We do not want to have `@octokit/routes` as a production dependency due to
|
||||
* its huge size. We are only interested in the REST API endpoint paths that
|
||||
* trigger notifications. So instead we automatically generate a file that
|
||||
* only contains these paths when @octokit/routes has a new release.
|
||||
*/
|
||||
const { writeFileSync } = require('fs')
|
||||
|
||||
const routes = require('@octokit/routes')
|
||||
const paths = []
|
||||
|
||||
Object.keys(routes).forEach(scope => {
|
||||
const scopeEndpoints = routes[scope]
|
||||
scopeEndpoints.forEach(endpoint => {
|
||||
if (endpoint.triggersNotification) {
|
||||
paths.push(endpoint.path)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const uniquePaths = [...new Set(paths.sort())]
|
||||
writeFileSync('./lib/triggers-notification-paths.json', JSON.stringify(uniquePaths, null, 2) + '\n')
|
Loading…
Add table
Add a link
Reference in a new issue