Potential fix for code scanning in github action
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
- name: Verify PR labels and source
run: |
LABELS="${{ join(github.event.pull_request.labels.*.name, ',') }}"
- BRANCH="${{ github.event.pull_request.head.ref }}"
+ BRANCH="$BRANCH"
if [[ "$LABELS" != *"dependencies"* ]]; then
echo "❌ PR does not have 'dependencies' label"
echo "✅ PR has 'dependencies' label and valid branch name"
+ env:
+ BRANCH: ${{ github.event.pull_request.head.ref }}
# IMPORTANT: Checkout the PR's head to validate file changes
# This is required for the git commands in security check 5
- name: Checkout PR branch