Repository navigation
fix(gitcafe): show line counts on linked and listed pull requests #22633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+88
−15
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d3b564c
fix(gitcafe): report line counts for linked and listed pull requests
maria-rcks db9d59b
fix(gitcafe): count lines only for linked pull requests, once per head
maria-rcks 61c100d
chore: retrigger ci
maria-rcks 736b01f
fix(gitcafe): leave summary line counts out when they cannot be read
maria-rcks a898a06
fix(gitcafe): key cached line totals on the compared commits
maria-rcks a58e478
fix(gitcafe): leave line counts unknown for pulls too large to count
maria-rcks File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
Share an in-flight line-stat read for each key.
lineStatsByHeadreceives an entry only afterreadLineStatssucceeds. If summary and detail reads for the same head overlap, both can miss the cache and start the expensive/changesand/diff-filesreads. Track the in-flight read per key, and remove it on failure so a later call can retry.🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note
Written by
claude-opus-5-5on behalf of Marianot changing this. an overlap needs the once-a-minute linked-pr sync and a detail open for the same head at the same moment, and it costs one duplicate read before the cache fills. tracking in-flight reads adds state for that rare case, and this pr is trimming git.cafe line-count work, not adding machinery.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maria-rcks Understood. The overlap can duplicate reads, but it does not affect correctness. Keeping the cache simple is a reasonable trade-off here. I won’t press for in-flight deduplication. Thanks for the guidance.
✏️ Learnings added
You are interacting with an AI system.