From b5071351c2c12aca12eff599c63b2d3374eab520 Mon Sep 17 00:00:00 2001 From: Salman Mohammed Date: Sat, 25 Jan 2025 16:26:11 -0500 Subject: [PATCH] fix: pr number needs to be outputted from trigger job (#770) --- .github/workflows/pr-comment-bundle-desktop.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr-comment-bundle-desktop.yml b/.github/workflows/pr-comment-bundle-desktop.yml index 839b2078..36ca20c0 100644 --- a/.github/workflows/pr-comment-bundle-desktop.yml +++ b/.github/workflows/pr-comment-bundle-desktop.yml @@ -12,7 +12,7 @@ on: permissions: pull-requests: write checks: read - issues: write + # issues: write name: Workflow to Bundle Desktop App @@ -26,6 +26,8 @@ jobs: runs-on: ubuntu-latest outputs: continue: ${{ steps.command.outputs.continue }} + # Cannot use github.event.pull_request.number since the trigger is 'issue_comment' + pr_number: ${{ steps.command.outputs.issue_number }} steps: - uses: github/command@v1.3.0 id: command @@ -33,10 +35,6 @@ jobs: command: ".bundle" reaction: "eyes" allowed_contexts: pull_request - - name: Echo outputs - run: | - echo "Pull Request number is: '${{ steps.command.outputs.issue_number }}' - echo "Comment ID is: '${{ steps.command.outputs.comment_id }}' bundle-desktop: # Only run this if ".bundle" command is detected. @@ -65,14 +63,10 @@ jobs: with: merge-multiple: true - - name: Debug pull_request number - run: | - echo "Pull Request number is: '${{ github.event.pull_request.number }}'" - - name: Comment on PR with download link uses: peter-evans/create-or-update-comment@v4 with: - issue-number: ${{ github.event.pull_request.number }} + issue-number: ${{ needs.trigger-on-command.outputs.pr_number }} body: | ### Desktop App for this PR @@ -83,4 +77,3 @@ jobs: After downloading, unzip the file and drag the Goose.app to your Applications folder. The app is signed and notarized for macOS. This link is provided by nightly.link and will work even if you're not logged into GitHub. - edit-mode: replace