From e1757afe104258f8747c98d794caf7251d38f2bf Mon Sep 17 00:00:00 2001 From: burnettk Date: Thu, 1 Feb 2024 16:21:41 -0500 Subject: [PATCH] add debug --- .../workflows/auto-merge-dependabot-prs.yml | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/auto-merge-dependabot-prs.yml b/.github/workflows/auto-merge-dependabot-prs.yml index 2d956f14..8af95662 100644 --- a/.github/workflows/auto-merge-dependabot-prs.yml +++ b/.github/workflows/auto-merge-dependabot-prs.yml @@ -20,15 +20,15 @@ permissions: jobs: # uncomment this to print the context for debugging in case a job is getting skipped - # printJob: - # name: Print event - # runs-on: ubuntu-latest - # steps: - # - name: Dump GitHub context - # env: - # GITHUB_CONTEXT: ${{ toJson(github) }} - # run: | - # echo "$GITHUB_CONTEXT" + printJob: + name: Print event + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: | + echo "$GITHUB_CONTEXT" dependabot: runs-on: ubuntu-latest @@ -44,14 +44,18 @@ jobs: uses: actions/github-script@v6 with: script: | + console.log("download artifact: started") + console.log("download artifact: content.payload: ", context.payload) let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ owner: context.repo.owner, repo: context.repo.repo, run_id: context.payload.workflow_run.id, }); + console.log("download artifact: got allArtifacts") let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => { return artifact.name == "pr_number" })[0]; + console.log("download artifact: got matchArtifact: ", matchArtifact) let download = await github.rest.actions.downloadArtifact({ owner: context.repo.owner, repo: context.repo.repo,