diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 10124d8..69c5f62 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -16,8 +16,10 @@ jobs: name: Dump GitHub Context.Event runs-on: ubuntu-22.04 steps: - - name: Dump GitHub Context.Event - run: echo "${{ toJson(github.event) }}" | sed -r 's/#/\\#/g' + - name: Event details + run: | + echo "github.event_name: ${{ github.event_name }}" + echo "github.event.action: ${{ github.event.action }}" # Test for PR, merge queue and merge to main get-pr: diff --git a/action.yml b/action.yml index dee257d..06e67c4 100644 --- a/action.yml +++ b/action.yml @@ -34,9 +34,14 @@ runs: # Get PR number (different process for merge queue) if [ ${{ github.event_name }} == 'pull_request' ] then + echo "Event type: pull request" pr=${{ github.event.number }} - else + elif [ ${{ github.event_name }} == 'merge_group' ] pr=$(echo ${{ github.event.merge_group.head_ref }} | grep -Eo "queue/main/pr-[0-9]+" | cut -d '-' -f2) + echo "Event type: merge queue" + else + # pr=$(echo ${{ github.event.ref }} | grep -Eo "pr-[0-9]+" | cut -d '-' -f2) + echo "Event type: not pull request or merge queue" fi echo "Summary ---"