trstringer / manual-approval

Pause your GitHub Actions workflow and request manual approval from set approvers before continuing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

403 API rate limit causes to approval job to fail

duncanhall opened this issue · comments

Thanks for providing this action, it's a much needed pattern for those of us without GHE.

We are hitting an issue fairly regularly that is making it difficult to integrate however. Once the approval issue is opened, it seems the action makes repeated calls to the GH API to check for the existence of an approve/deny comment.

After a while (less than an hour) that call gets rejected with a 403:

error getting comments: GET https://api.github.com/repos/<redacted>/<redacted>/issues/905/comments: 403 API rate limit exceeded for installation ID 15708728. [rate reset in 9m20s

This error then fails the workflow and the approval issue becomes orphaned. We have to manually close the issue, and manually re-run the failed job, creating another issue.

Is there a way around this? Can we configure interval between those repeated API calls to be longer?

It seems like this is currently set to 10 seconds. This obviously makes the action more responsive once an approve/deny comment has been made, but it could likely be increased a fair amount and still be well within acceptable limits while still giving the desired functionality.

For context, we often have 2 of these approval jobs running (eg, a PR containing changes to 2 services, each with their own approval process).

If a configurable value for pollingInterval is an acceptable solution I can probably raise a PR when I get a chance