Skip to content

Commit

Permalink
Scanning-secrets: Support new-branch/renovate link
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed Feb 1, 2024
1 parent 0e9b07a commit 0a4beea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/scan-secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ jobs:
name: Provide URL showing code that needs human eyes (force-push or merge)
shell: bash
run: |
if [[ "$before" =~ ^0000+ ]]; then # Push to new branch (i.e. renovate branch)
echo "Please review newly opened branch for secret-leaks:"
# The event JSON provides the URL we need
jq -r -e '.compare' $GITHUB_EVENT_PATH
return 0
fi
echo "Please review force-push or merged-pr changes for secret-leaks:"
before=$(jq -r -e '.before' $GITHUB_EVENT_PATH)
after=$(jq -r -e '.after' $GITHUB_EVENT_PATH)
Expand Down

0 comments on commit 0a4beea

Please sign in to comment.