diff --git a/.github/workflows/autocomment-pr-merge.yml b/.github/workflows/autocomment-pr-merge.yml index 9398eeb3..5e5d2c53 100644 --- a/.github/workflows/autocomment-pr-merge.yml +++ b/.github/workflows/autocomment-pr-merge.yml @@ -1,7 +1,7 @@ name: Auto Comment on PR Merge on: - pull_request: + pull_request_target: types: [closed] permissions: @@ -10,27 +10,28 @@ permissions: jobs: comment: - runs-on: ubuntu-latest - permissions: - pull-requests: write if: github.event.pull_request.merged == true + runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Add Comment to Issue - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | + - name: Add Comment to Merged PR + run: | COMMENT=$(cat <