1
0
Fork 0
mirror of synced 2026-06-05 18:18:19 +00:00
create-pull-request/__test__
Peter Evans 5f6978faf0
fix: retry post-creation API calls on 422 eventual consistency errors (#4356)
Add retry logic to handle GitHub API eventual consistency errors that
can occur after creating a new pull request. Follow-up API calls for
milestones, labels, assignees, and reviewers may fail with a 422
"Could not resolve to a node" error before the PR is fully propagated.

- Add generic `retryWithBackoff` helper in `src/utils.ts` with
  exponential backoff (default 2 retries, starting at 1s delay)
- Wrap post-creation API calls in `src/github-helper.ts` with
  `withRetryForNewPr()`, which only retries for newly created PRs
- Use `@octokit/request-error` `RequestError` type for precise error
  matching (status 422 + "Could not resolve to a node" message)
- Add unit tests for `retryWithBackoff` covering success, retry,
  exhaustion, and non-retryable error scenarios
- Update `dist/index.js` bundle and `package.json` dependencies
2026-04-10 17:23:55 +01:00
..
create-or-update-branch.int.test.ts fix: support submodules when commit signing (#3354) 2024-09-18 09:46:39 -07:00
entrypoint.sh fix: preserve unicode in filepaths when commit signing (#3588) 2024-12-27 02:51:52 -08:00
git-command-manager.int.test.ts fix: preserve unicode in filepaths when commit signing (#3588) 2024-12-27 02:51:52 -08:00
git-config-helper.int.test.ts feat: signed commits (v7) (#3057) 2024-09-03 08:54:12 +01:00
git-config-helper.unit.test.ts feat: v6 (#2717) 2024-01-31 11:06:34 +00:00
integration-tests.sh feat: v6 (#2717) 2024-01-31 11:06:34 +00:00
utils.unit.test.ts fix: retry post-creation API calls on 422 eventual consistency errors (#4356) 2026-04-10 17:23:55 +01:00