From f12fdb904745ebf33dc79a51fb4888f4edff3af9 Mon Sep 17 00:00:00 2001 From: antazoey Date: Mon, 27 Jan 2025 16:12:49 -0600 Subject: [PATCH] fix: use amanns --- .github/workflows/commitlint.yaml | 58 ++++++++++++++----------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/.github/workflows/commitlint.yaml b/.github/workflows/commitlint.yaml index 32554cbb03..9be589907c 100644 --- a/.github/workflows/commitlint.yaml +++ b/.github/workflows/commitlint.yaml @@ -1,34 +1,30 @@ -on: push +name: Validate PR metadata -name: Commit Message +on: + pull_request: + types: + - opened + - edited + - synchronize -# NOTE: Skip check on PR so as not to confuse contributors -# NOTE: Also install a PR title checker so we don't mess up merges -jobs: - commit-msg: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" +permissions: + pull-requests: read - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - pip install -r cz-requirement.txt - - - name: Get base and head commits - id: commits - run: | - echo "BASE_SHA=$(git merge-base origin/${{ github.event.pull_request.base.ref }} HEAD)" >> $GITHUB_ENV - echo "HEAD_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV - - - name: Check commit history - run: cz check --rev-range $BASE_SHA..$HEAD_SHA +jobs: + validate-pr: + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + name: Run conventional commit checker + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + with: + types: | + feat + perf + fix + chore + refactor + docs + test