Skip to content

Commit

Permalink
fix: use amanns
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Jan 27, 2025
1 parent 1d91d8e commit f12fdb9
Showing 1 changed file with 27 additions and 31 deletions.
58 changes: 27 additions & 31 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f12fdb9

Please sign in to comment.