feat: deduplicate issues across review runs to avoid repeated feedback#264
Open
Sarthak-commits wants to merge 3 commits into
Open
feat: deduplicate issues across review runs to avoid repeated feedback#264Sarthak-commits wants to merge 3 commits into
Sarthak-commits wants to merge 3 commits into
Conversation
When reviewing a PR, the description and existing comments are now fetched via the GitHub API and passed to the LLM as additional context. This lets the reviewer understand what the PR is about and what issues have already been raised by other reviewers. - gito/pr_context.py: New module that fetches PR data from GitHub - gito/core.py: review() and answer() now pass pr_context to prompts - gito/config.toml: Prompt template updated with pr_context section - gito/project_config.py: Added include_pr_context config option (default true) - tests/test_pr_context.py: 5 tests covering fetch logic Users can disable this with include_pr_context = false in their .gito/config.toml to save on token usage. Closes Nayjest#230
The <img> tag was nested inside an <h2> tag which breaks GitHub's markdown rendering. Moved the icon to its own line above the heading.
When Gito re-reviews a PR, it now checks for previous review comments by extracting issue titles, and filters out any issues that were already reported. This prevents the same feedback from appearing repeatedly when some issues have been addressed and others haven't. - _extract_issue_titles(): parses issue titles from review markdown - _filter_duplicate_issues(): fetches previous reviews and filters duplicates - _remove_duplicate_sections(): removes matching issue sections from the new review body, with a fallback message when all issues are duplicates
Contributor
I've Reviewed the CodeThe logging statement incorrectly reports the total number of previously seen issue titles instead of the actual number of duplicates removed from the current review body.
|
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.

Implements the feature request from #231 — Gito now deduplicates issues across review runs.
Problem: When Gito reviews a PR, the user addresses some issues, and then Gito re-reviews, it reports all the same issues again — including ones already fixed.
Solution: Before posting a new review comment, Gito now:
HTML_CR_COMMENT_MARKER)###N<title>sections)Changes to
gito/commands/gh_post_review_comment.py:_extract_issue_titles()— parses issue titles from markdown review body_filter_duplicate_issues()— orchestrates fetching previous reviews and filtering_remove_duplicate_sections()— removes matched issue sections from the new reviewAll logic is wrapped in try/except so failure to fetch previous reviews is non-fatal (falls through to posting the full review).
Closes #231