From 6a3c128590d3afbef5a568b2b8d81ca963473f01 Mon Sep 17 00:00:00 2001 From: Ptitloup Date: Thu, 21 Sep 2023 15:53:36 +0200 Subject: [PATCH] try script --- .github/workflows/commentPR.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/commentPR.yml b/.github/workflows/commentPR.yml index 3f5816d834..f67dd30172 100644 --- a/.github/workflows/commentPR.yml +++ b/.github/workflows/commentPR.yml @@ -4,7 +4,7 @@ on: pull_request jobs: example_comment_pr: - permissions: write-all + permissions: read-all runs-on: ubuntu-latest # permissions: # contents: write @@ -16,15 +16,16 @@ jobs: - name: Checkout uses: actions/checkout@v3 - # - uses: actions/github-script@v6 - # with: - # script: | - # github.rest.issues.createComment({ - # issue_number: context.issue.number, - # owner: context.repo.owner, - # repo: context.repo.repo, - # body: '👋 Thanks for reporting!' - # }) + - uses: actions/github-script@v6 + with: + script: | + github.rest.pull_request.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '👋 Thanks for reporting!' + }) + - name: Add comment to PR env: URL: ${{ github.event.pull_request.comments_url }}