fix: hide stale reviews for missing commits#686
Merged
Conversation
Filter branch timeline reviews to SHAs that are still visible in git history and cover reset-away commits with a unit test. Signed-off-by: Matt Toohey <contact@matttoohey.com>
- Allow reviews with empty commit_sha through the visibility filter so in-progress branch reviews (not yet associated with a commit) are not hidden from the timeline. - Use 'git init --initial-branch=main' in test helper instead of separate init + checkout to be explicit about the default branch name regardless of system git configuration. Signed-off-by: Matt Toohey <contact@matttoohey.com>
Move the TempGitRepo helper from timeline.rs tests into a dedicated src/test_utils.rs module so it can be reused by future test modules without duplication. Signed-off-by: Matt Toohey <contact@matttoohey.com>
Allow branch timeline visibility to retain stale reviews when their loaded active comments include a user-authored comment. Keep stale empty reviews, agent-only reviews, and reviews with only deleted user comments hidden, and cover those cases in timeline tests. Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Test <test@example.com>
Extract a shared helper that removes every inherited GIT_* variable before running git and use it from the CLI and test git helpers. Signed-off-by: Matt Toohey <contact@matttoohey.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🤖 Summary