From cc975546950d6d81c9a98b5092cb06d41a9fee48 Mon Sep 17 00:00:00 2001 From: "w. ian douglas" Date: Fri, 29 Aug 2025 17:58:53 -0600 Subject: [PATCH] trying to restore functionality for api-key sending after merging a recipe (#4446) --- .github/workflows/send-api-key.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/send-api-key.yml b/.github/workflows/send-api-key.yml index cee7e3bf..f9e65773 100644 --- a/.github/workflows/send-api-key.yml +++ b/.github/workflows/send-api-key.yml @@ -24,8 +24,15 @@ jobs: set -e echo "🔍 Checking if recipe files were added or modified in merged PR..." - # Get the list of files that were added or modified in the merged PR (not deleted) - CHANGED_FILES=$(git diff --name-only --diff-filter=AM ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}) + # Get the current commit (merge commit) and the previous commit on the base branch + CURRENT_COMMIT=$(git rev-parse HEAD) + PREVIOUS_COMMIT=$(git rev-parse HEAD~1) + + echo "Current commit: $CURRENT_COMMIT" + echo "Previous commit: $PREVIOUS_COMMIT" + + # Get the list of files that were added or modified in this merge (not deleted) + CHANGED_FILES=$(git diff --name-only --diff-filter=AM $PREVIOUS_COMMIT..$CURRENT_COMMIT) echo "Files added/modified in merged PR:" echo "$CHANGED_FILES"