You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pr-triage: retry a GitHub API 5xx or network error before the step fails #286
The reusable pr-triage workflow (.github/workflows/pr-triage.yml) fails its step on the first HTTP 5xx or network error from the GitHub API. createGitHubApi.request in scripts/lib/risk-paths.mjs makes 1 attempt and throws.
GitHub API GET /repos/frostyard/snowkit/pulls/16/files failed: HTTP 500
Attempt 2 of the same run passed on the same SHA. A transient GitHub error turns the required pr-triage check red until a person re-runs the job.
Proposed fix
In createGitHubApi.request:
Retry an HTTP 5xx answer or a network error (fetch throws) a small, bounded number of times, with exponential backoff.
Never retry a 4xx: 403 (permissions, secondary rate limit) and 404 keep their current meaning (allow404, readiness unknown on 403).
Retry only requests that are safe to repeat: GET, DELETE, and the add-labels POST (adding a label the issue has is a no-op). POST .../comments is not retried, since a 5xx can still have written the comment; a re-run already finds the readiness marker and the shadow step removes duplicates.
After the last attempt, the error message and error.status stay as they are today.
A test fails without the retry.
The library is embedded in pr-triage.yml and risk-paths.yml by npm run sync:risk-paths-workflow, so callers get the fix when they move their pin.
Activity
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network …