From e3dfd8a2dce4f809b6e900f5c6c57a858bd7c983 Mon Sep 17 00:00:00 2001 From: Derek Roberts Date: Tue, 5 Dec 2023 22:48:40 -0800 Subject: [PATCH] Dump github.event --- .github/workflows/pr-open.yml | 6 +++++- action.yml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-open.yml b/.github/workflows/pr-open.yml index 99b194a..ce49e4a 100644 --- a/.github/workflows/pr-open.yml +++ b/.github/workflows/pr-open.yml @@ -20,8 +20,12 @@ jobs: run: | echo "github.event_name: ${{ github.event_name }}" echo "github.event.action: ${{ github.event.action }}" - echo "github.event: ${{ github.event }}" + - name: Dump GitHub Context.Event + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: | + echo "${GITHUB_CONTEXT}" | jq . # Test for PR, merge queue and merge to main get-pr: diff --git a/action.yml b/action.yml index 48a6cb8..bb8bdf9 100644 --- a/action.yml +++ b/action.yml @@ -44,7 +44,7 @@ runs: # HEAD=$(git log main --oneline | head -n1 | awk '{print $1}') HEAD=${{ github.event.after }} pr=$(\ - curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" \ + curl -sL -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/${{ github.repository }}/commits/${HEAD}/pulls \ | jq .[0].number