Add edit-in-place comments and diff-hash skip for CI#4
Open
Conversation
When running in CI (GitLab CI / GitHub Actions), hodor now: - Updates the existing review comment instead of creating a new one - Computes a SHA-256 hash of the diff and embeds it in the comment footer - Skips the review entirely if the diff hasn't changed since the last review This eliminates stale comment trails after force pushes and avoids wasted LLM costs on unchanged diffs. GitHub comments switch from review comments (gh pr review) to issue comments (gh api) to enable editing. Adds --skip-if-unchanged/--no-skip-if-unchanged CLI flag (default: on). Also instructs the review template to omit empty issue categories when no bugs are found.
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
<!-- hodor:diff-hash:sha256:... -->. If the hash matches on the next run, the review is skipped entirely ($0 cost)gh pr review --comment(review comments) togh apiissue comments, which support editing via API--skip-if-unchanged/--no-skip-if-unchanged(default: enabled when--postis used)Test plan
_compute_diff_hash()(4 tests: with SHA, fallback to branch, failure, consistency)_extract_diff_hash()(3 tests: present, missing, empty)hodor <url> --poston a GitLab MR, verify comment created with diff hash in footer