Bug Description
ACIG encounters a 422 "Path could not be resolved" error when trying to create inline review comments on PRs that contain deleted files.
Root Cause
The buildReviewComments function in internal/reporters/github.go:143-158 does not verify that file paths exist in the PR's changed files before attempting to create review comments.
Steps to Reproduce
- ACIG analyzes code and finds issues
- ACIG tries to create inline review comments on files
- GitHub API rejects comments on files not in the PR's diff (422 error)
- ACIG falls back to a single sticky comment
Expected Behavior
ACIG should fetch the PR's changed files and filter findings to only those files before creating review comments, preventing the 422 error.
Current Workaround
The fallback to a single sticky comment is working, but it's not ideal as it doesn't provide inline context on the actual changed files.
References
internal/reporters/github.go:buildReviewComments
Bug Description
ACIG encounters a 422 "Path could not be resolved" error when trying to create inline review comments on PRs that contain deleted files.
Root Cause
The
buildReviewCommentsfunction ininternal/reporters/github.go:143-158does not verify that file paths exist in the PR's changed files before attempting to create review comments.Steps to Reproduce
Expected Behavior
ACIG should fetch the PR's changed files and filter findings to only those files before creating review comments, preventing the 422 error.
Current Workaround
The fallback to a single sticky comment is working, but it's not ideal as it doesn't provide inline context on the actual changed files.
References
internal/reporters/github.go:buildReviewComments