feat: add @octokit/plugin-retry to handle retriable server errors (#4298)

Add the retry plugin to automatically retry requests that fail with
server errors (5xx status codes). Configure the plugin to exclude 429
(rate limit) from retries since that is already handled by the
throttling plugin.

- Add @octokit/plugin-retry dependency
- Register retry plugin in Octokit client
- Export retryOptions with doNotRetry list excluding 429
- Apply retryOptions in GitHubHelper constructor
This commit is contained in:
Peter Evans 2026-01-21 15:20:27 +00:00 committed by GitHub
parent 70001242bf
commit c0f553fe54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 205 additions and 49 deletions

View file

@ -37,6 +37,7 @@
"@octokit/core": "^6.1.6",
"@octokit/plugin-paginate-rest": "^11.6.0",
"@octokit/plugin-rest-endpoint-methods": "^13.5.0",
"@octokit/plugin-retry": "^7.2.1",
"@octokit/plugin-throttling": "^9.6.1",
"node-fetch-native": "^1.6.7",
"p-limit": "^6.2.0",