Skip to content

Conversation

fernandosantos-br
Copy link
Collaborator

No description provided.

…dd _get_consistent_commit_sha for handling PR merge refs.
@Copilot Copilot AI review requested due to automatic review settings July 22, 2025 16:08
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the get_git_info method to improve commit SHA retrieval consistency, particularly for pull request merge references. The change introduces a new method that handles fetching specific refs and uses FETCH_HEAD to get the correct commit SHA instead of relying solely on the HEAD commit.

  • Extracts commit SHA fetching logic into a dedicated _get_consistent_commit_sha method
  • Implements special handling for PR merge refs using git fetch and FETCH_HEAD
  • Adds fallback to HEAD commit for non-PR refs or when fetch operations fail

@fernandosantos-br fernandosantos-br merged commit 0ec5743 into main Jul 22, 2025
5 checks passed
@fernandosantos-br fernandosantos-br deleted the feature/fix-sha-sarif branch July 22, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants