diff --git a/.github/workflows/pr-checker.yml b/.github/workflows/pr-checker.yml index c94cf7b61c..1674a8c3b7 100644 --- a/.github/workflows/pr-checker.yml +++ b/.github/workflows/pr-checker.yml @@ -1,12 +1,9 @@ name: PR Checker on: - pull_request: + pull_request_target: types: [opened, edited, ready_for_review, reopened, synchronize] -permissions: - issues: write - pull-requests: write jobs: check_commit_name_in_pr: @@ -16,7 +13,6 @@ jobs: - name: Cleanup Previous Comment uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} script: | const { data: comments } = await github.rest.issues.listComments({ owner: context.repo.owner, @@ -32,11 +28,9 @@ jobs: comment_id: previousComment.id }); } - - name: Check Commits uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} script: | const { data: commits } = await github.rest.pulls.listCommits({ owner: context.repo.owner, @@ -62,4 +56,4 @@ jobs: }); core.setFailed(`Found ${invalidCommits.length} invalid commit(s):\n${invalidCommitNames.join("\n-------------------\n")}`); - } + } \ No newline at end of file