Skip to content

refactor: apply retry at individual API call sites inside createTree #24

Description

@c-vigo

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions