Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't look up approval candidates when no approval is required (#808)
We always check the approval candidates when evaluating an approval policy. This process ends up making an API call to list the comments on the PR, so that the approvers given in the policy can be checked against the commenters or reviewers on the PR and only the relevant people considered. This search currently happens regardless of whether any approvals are required. If there aren't any then we can save the API calls and a bit of time by skipping the search. PRs can be evaluated fairly frequently depending on the policy, so this can add up to a lot of API calls.
- Loading branch information