Skip to content

Conversation

@brijeshp56
Copy link
Collaborator

PDP-684: updated workflow to checkout only head commit

@brijeshp56 brijeshp56 requested a review from Copilot January 19, 2026 10:36
Copy link
Contributor

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 updates the TruffleHog security scanning workflow to simplify the repository checkout process by fetching only the head commit instead of the full history.

Changes:

  • Simplified checkout configuration to fetch only the PR head commit with depth of 1
  • Updated base commit references to use head.sha~1 instead of base.sha for scanning
  • Clarified comment about secret resolution handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

git fetch origin +refs/pull/${{ github.event.pull_request.number }}/head:refs/remotes/origin/pr-head
echo "Fetched PR #${{ github.event.pull_request.number }} head commit: ${{ github.event.pull_request.head.sha }}"
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

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

Using fetch-depth: 1 with head.sha~1 as base (lines 70, 87) will fail because the parent commit won't be available in a shallow clone. Either increase fetch-depth to 2 or revert to fetching the full history to ensure the base commit is accessible for comparison.

Suggested change
fetch-depth: 1
fetch-depth: 2

Copilot uses AI. Check for mistakes.
@brijeshp56 brijeshp56 merged commit 74e685b into agottumu_dev Jan 19, 2026
1 check passed
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