add throttling

This commit is contained in:
Peter Evans 2024-08-14 21:09:51 +01:00
parent 3cc54e847d
commit 13fa7b0c66
5 changed files with 5460 additions and 6792 deletions

View file

@ -1,7 +1,7 @@
import * as core from '@actions/core'
import {Inputs} from './create-pull-request'
import {Commit} from './git-command-manager'
import {Octokit, OctokitOptions} from './octokit-client'
import {Octokit, OctokitOptions, throttleOptions} from './octokit-client'
import pLimit from 'p-limit'
import * as utils from './utils'
@ -41,6 +41,7 @@ export class GitHubHelper {
} else {
options.baseUrl = 'https://api.github.com'
}
options.throttle = throttleOptions
this.octokit = new Octokit(options)
}