github-script
github-script copied to clipboard
Ability to Use throttling Plugin
I would like the ability to use the throttling plugin. I was going to create a PR but it looks like the octokit client is instantiated using the @actions/github package, which would mean I would need to make a PR for that codebase first and then create a PR for this codebase once that codebase has merged it.
So... is there a reason why this codebase is using @actions/github instead of just including the @octokit/** packages directly and instantiating directly. This would avoid having to PR to the other repo and coordinate releases in order to support octokit plugin functionality.
I'm happy to make the change in a PR and make sure everything is working if y'all are on board. Just let me know. Thanks!
I'd love to have throttling support too!
Out of curiosity, what is the use case for throttling within an action? I'm sure there's a valid one, just can't think of it and would love to know!
E.g. when doing bulk actions like opening a couple of dozen issues across repositories from a single action. You'd be hitting rate limits soon.
when doing bulk actions like opening a couple of dozen issues across repositories from a single action. You'd be hitting rate limits soon.
Ah yeah that makes sense. I guess I hadn't considered use of actions/github-script in a workflow that runs long enough to recover from rate limiting and then continue, but there's no reason one can't do that!
Until this is officially supported, we have achieved the same by using the wrap hook, here's a great example from @gr2m: https://github.com/octokit/octokit.js/issues/1069#throttling