From f1f4c29a9980480eefe75b973272c894aceaad17 Mon Sep 17 00:00:00 2001 From: Paolo Ricciuti Date: Tue, 5 Nov 2024 15:03:23 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20`pkg.pr.new`=C2=A0comment=20workflow=20(?= =?UTF-8?q?#14156)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: `pkg.pr.new` comment workflow * chore: remove path from initial workflow and add ls * chore: add path back since it's mandatory --- .github/workflows/pkg.pr.new-comment.yml | 7 ++++--- .github/workflows/pkg.pr.new.yml | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pkg.pr.new-comment.yml b/.github/workflows/pkg.pr.new-comment.yml index b6ad1272f0..10d979121f 100644 --- a/.github/workflows/pkg.pr.new-comment.yml +++ b/.github/workflows/pkg.pr.new-comment.yml @@ -15,9 +15,10 @@ jobs: uses: actions/download-artifact@v4 with: name: output.json - path: output.json github-token: ${{ secrets.GITHUB_TOKEN }} run-id: ${{ github.event.workflow_run.id }} + + - run: ls -R . - name: 'Post or update comment' uses: actions/github-script@v6 with: @@ -85,8 +86,8 @@ jobs: } if (output.event_name === 'pull_request') { - if (context.issue.number) { - await create_or_update_comment(context.issue.number); + if (output.number) { + await create_or_update_comment(output.number); } } else if (output.event_name === 'push') { const pull_requests = await github.rest.pulls.list({ diff --git a/.github/workflows/pkg.pr.new.yml b/.github/workflows/pkg.pr.new.yml index ccb05ec93b..a55dd5963c 100644 --- a/.github/workflows/pkg.pr.new.yml +++ b/.github/workflows/pkg.pr.new.yml @@ -37,4 +37,6 @@ jobs: uses: actions/upload-artifact@v4 with: name: output.json - path: output.json + path: ./output + + - run: ls -R .