From 0b489c1d83430318fa42f0ad904e60c354eb837d Mon Sep 17 00:00:00 2001 From: Aatman Vaidya Date: Sat, 28 Oct 2023 02:17:20 +0530 Subject: [PATCH 1/2] feat: github action shows comment on PR --- .../build-pr-review-both-browsers.yml | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-pr-review-both-browsers.yml b/.github/workflows/build-pr-review-both-browsers.yml index 63ba0544..83926277 100644 --- a/.github/workflows/build-pr-review-both-browsers.yml +++ b/.github/workflows/build-pr-review-both-browsers.yml @@ -9,8 +9,6 @@ permissions: actions: write issues: write pull-requests: write - contents: write - repository-projects: write jobs: chrome-publish: @@ -52,19 +50,10 @@ jobs: browser-extension/plugin/extension-firefox/ browser-extension/plugin/extension-chrome/ - # - name: Debug GitHub Token Permissions - # run: echo ${{ secrets.GITHUB_TOKEN }} - - # - name: Create PR Comment with Artifact Link - # uses: actions/github-script@v5 - # with: - # github-token: ${{ secrets.GITHUB_TOKEN }} - # script: | - # const artifact_url = `https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/runs/${{ github.run_id }}`; - # const comment_body = `🛠 Your build files are available [here](${artifact_url}).`; - # await github.rest.issues.createComment({ - # issue_number: context.payload.pull_request.number, - # owner: context.repo.owner, - # repo: context.repo.repo, - # body: comment_body - # }); + - name: "test" + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + 🛠 Your build files are available [here](https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/runs/${{ github.run_id }}) + comment_tag: execution + mode: recreate \ No newline at end of file From 37ae3cd65a1b63426a50157cf902d4d5d628a82c Mon Sep 17 00:00:00 2001 From: Aatman Vaidya Date: Sat, 28 Oct 2023 02:24:17 +0530 Subject: [PATCH 2/2] adding more permissions --- .github/workflows/build-pr-review-both-browsers.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-pr-review-both-browsers.yml b/.github/workflows/build-pr-review-both-browsers.yml index 83926277..63ef11cc 100644 --- a/.github/workflows/build-pr-review-both-browsers.yml +++ b/.github/workflows/build-pr-review-both-browsers.yml @@ -9,6 +9,8 @@ permissions: actions: write issues: write pull-requests: write + contents: write + repository-projects: write jobs: chrome-publish: