From 555113a6f222da5c17c4cd70d6b1966380528375 Mon Sep 17 00:00:00 2001 From: Keith Stevens Date: Tue, 10 Jan 2023 16:24:25 +0900 Subject: [PATCH] Revert "changed pre-commit event type" This reverts commit 5b275ed804e813afe964511efbe0840d701b57bc. --- .github/workflows/pre-commit.yaml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 47f21feb..0f82185f 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -4,28 +4,20 @@ on: push: branches: - main - pull_request_target: + pull_request: + workflow_call: jobs: pre-commit: runs-on: ubuntu-latest steps: - # in case of PR, check out the PR's head branch - uses: actions/checkout@v3 - if: github.event_name == 'pull_request_target' - with: - ref: ${{ github.event.pull_request.head.sha }} - - # in case of push, check out the main branch - - uses: actions/checkout@v3 - if: github.event_name == 'push' - - uses: actions/setup-python@v4 with: python-version: "3.10" - uses: pre-commit/action@v3.0.0 - name: Post PR comment on failure - if: failure() && github.event_name == 'pull_request_target' + if: failure() && github.event_name == 'pull_request' uses: peter-evans/create-or-update-comment@v2 with: issue-number: ${{ github.event.pull_request.number }}