ci/github-script/commits: init from ci/check-cherry-picks
This turns the check-cherry-pick script into a github-script based JavaScript program. This makes it much easier to extend to check reverts or merge commits later on.
This commit is contained in:
@@ -20,6 +20,8 @@ module.exports = async function ({ github, core }, callback) {
|
||||
// Pause between mutative requests
|
||||
const writeLimits = new Bottleneck({ minTime: 1000 }).chain(allLimits)
|
||||
github.hook.wrap('request', async (request, options) => {
|
||||
// Requests to a different host do not count against the rate limit.
|
||||
if (options.url.startsWith('https://github.com')) return request(options)
|
||||
// Requests to the /rate_limit endpoint do not count against the rate limit.
|
||||
if (options.url == '/rate_limit') return request(options)
|
||||
// Search requests are in a different resource group, which allows 30 requests / minute.
|
||||
|
||||
Reference in New Issue
Block a user