From 0a4beea6db36023e7cda744ff63ad3ba3cafb6f9 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Thu, 1 Feb 2024 11:06:54 -0500 Subject: [PATCH] Scanning-secrets: Support new-branch/renovate link Signed-off-by: Chris Evich --- .github/workflows/scan-secrets.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/scan-secrets.yml b/.github/workflows/scan-secrets.yml index f429447d2d..38f8344311 100644 --- a/.github/workflows/scan-secrets.yml +++ b/.github/workflows/scan-secrets.yml @@ -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)