Context
Follow-up from PR #23 review: commitViaAPI wraps the entire createTree(...) call in withRetry. createTree can perform many REST calls (createBlob, chained createTree). A retry after a mid-way transient failure re-runs the whole operation and can re-upload blobs/trees, increasing API usage and rate-limit pressure.
Proposal
Apply withRetry at individual Octokit REST call sites inside createTree and createTreeChained (or thread RetryConfig into helpers) instead of retrying the whole multi-call operation.
Tradeoffs
- Pro: Finer-grained retries avoid redoing successful work after a failure late in the batch.
- Con: Requires threading retry config through internal helpers and more surface area for tests.
Related
- Copilot review comment on
src/commit.ts (coarse createTree wrap)
Context
Follow-up from PR #23 review:
commitViaAPIwraps the entirecreateTree(...)call inwithRetry.createTreecan perform many REST calls (createBlob, chainedcreateTree). A retry after a mid-way transient failure re-runs the whole operation and can re-upload blobs/trees, increasing API usage and rate-limit pressure.Proposal
Apply
withRetryat individual Octokit REST call sites insidecreateTreeandcreateTreeChained(or threadRetryConfiginto helpers) instead of retrying the whole multi-call operation.Tradeoffs
Related
src/commit.ts(coarsecreateTreewrap)