Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce API calls for branch protection checks #31043

Open
rarkins opened this issue Aug 27, 2024 · 0 comments
Open

Reduce API calls for branch protection checks #31043

rarkins opened this issue Aug 27, 2024 · 0 comments
Labels
performance Performance-related improvements platform:github GitHub Platform priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Aug 27, 2024

Describe the proposed change(s).

Example logs from a non-paid repo:

DEBUG: GET https://api.github.com/repos/msw-kialo/renovate-push-rebase/branches/main/protection = (code=ERR_NON_2XX_3XX_RESPONSE, statusCode=403 retryCount=0, duration=66) (branch="renovate/boto3-1.x-lockfile")
DEBUG: Endpoint: repos/msw-kialo/renovate-push-rebase/branches/main/protection, needs paid GitHub plan (branch="renovate/boto3-1.x-lockfile")
DEBUG: Branch protection: Do not have permissions to detect branch protection (branch="renovate/boto3-1.x-lockfile")

If a repo's base branch returns 4xx for branch protection:

  • We should not check it for any other base branches
  • We could cache this for 24 hours to avoid checking it again

Does not necessarily need to be only due to "needs GitHub plan".

@rarkins rarkins added type:feature Feature (new functionality) priority-4-low Low priority, unlikely to be done unless it becomes important to more people platform:github GitHub Platform performance Performance-related improvements labels Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance-related improvements platform:github GitHub Platform priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality)
Projects
None yet
Development

No branches or pull requests

1 participant