Skip to content

Conversation

@bensbigolbeard
Copy link
Contributor

@bensbigolbeard bensbigolbeard commented Feb 6, 2025

📝 Description

  • adds fallback for diff attempts through the compare endpoint, which fails with "diff too large" errors for large repos with many deltas between SHAs.
  • the change is to first attempt the existing diff call, then when you receive a 406 (diff too large error code), fetch each sha and use the local git installation to run the diff.
  • new failure states:
    • when diff fails with 40x errors, via octokit.repos.compareCommitsWithBasehead, the catch block processes matching cases, else it's thrown again to match current handling
    • when individual branches/SHAs cannot be retrieved via git.fetch
    • when diffs between two SHAs fail via git.diff

🔗 Related Issues

@bensbigolbeard bensbigolbeard requested a review from a team as a code owner February 6, 2025 16:39
@bensbigolbeard bensbigolbeard force-pushed the diff-fallback branch 21 times, most recently from aa6563b to 9af049a Compare February 12, 2025 21:12
@bensbigolbeard
Copy link
Contributor Author

bensbigolbeard commented Feb 12, 2025

closing in favor of #702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant