Skip to content

Commit 0a4beea

Browse files
committed
Scanning-secrets: Support new-branch/renovate link
Signed-off-by: Chris Evich <[email protected]>
1 parent 0e9b07a commit 0a4beea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/scan-secrets.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ jobs:
8181
name: Provide URL showing code that needs human eyes (force-push or merge)
8282
shell: bash
8383
run: |
84+
if [[ "$before" =~ ^0000+ ]]; then # Push to new branch (i.e. renovate branch)
85+
echo "Please review newly opened branch for secret-leaks:"
86+
# The event JSON provides the URL we need
87+
jq -r -e '.compare' $GITHUB_EVENT_PATH
88+
return 0
89+
fi
8490
echo "Please review force-push or merged-pr changes for secret-leaks:"
8591
before=$(jq -r -e '.before' $GITHUB_EVENT_PATH)
8692
after=$(jq -r -e '.after' $GITHUB_EVENT_PATH)

0 commit comments

Comments
 (0)