diff --git a/.github/workflows/close-on-invalid-label.yaml b/.github/workflows/close-on-invalid-label.yaml index 1d3335dd75..153e729fc6 100644 --- a/.github/workflows/close-on-invalid-label.yaml +++ b/.github/workflows/close-on-invalid-label.yaml @@ -23,7 +23,7 @@ jobs: run: gh issue close ${{ github.event.issue.html_url }} - name: Close PR - if: ${{ github.event_name == 'pull_request' }} + if: ${{ github.event_name == 'pull_request_target' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh pr close ${{ github.event.pull_request.html_url }} + run: gh pr close ${{ github.event.pull_request_target.html_url }}