Expose commit hash in sarif blame output #103
Merged
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.
The
sarif blamecommand now includes the commit hash/SHA in the blame information output. Previously, while the blame functionality extracted commit hashes fromgit blame --porcelain, it only exposed author information, timestamps, and commit messages without the actual commit identifier.The commit hash is now available as a
commitfield in the blame properties:{ "properties": { "blame": { "commit": "915da616c17784840dd6b63e58aea0503e451264", "author": "Test User", "author-mail": "<test@example.com>", "author-time": "1756489481", "author-tz": "+0000", "committer": "Test User", "committer-mail": "<test@example.com>", "committer-time": "1756489481", "committer-tz": "+0000", "summary": "Fix file format", "filename": "test.py" } } }This change also adds a
commitfiltering shortcut that maps toproperties.blame.commitfor easier filtering by commit hash.The implementation is minimal and preserves all existing functionality while adding the requested commit hash information that was already being extracted internally.
Fixes #99.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.