From 37891fb83bb3815d92d258b0587f6b362bd23b97 Mon Sep 17 00:00:00 2001 From: recalcitrantsupplant Date: Mon, 13 Jan 2025 12:11:57 +1000 Subject: [PATCH] feat: include commitlint in PR to main GHA --- .github/workflows/on_pr_to_main.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/on_pr_to_main.yaml b/.github/workflows/on_pr_to_main.yaml index 1f971554..5eb17ea8 100644 --- a/.github/workflows/on_pr_to_main.yaml +++ b/.github/workflows/on_pr_to_main.yaml @@ -4,6 +4,8 @@ on: pull_request: types: - opened + - edited + - synchronize branches: - main workflow_dispatch: @@ -58,3 +60,20 @@ jobs: #---------------------------------------------- - name: Run tests run: poetry run pytest tests + + lint-pr-title: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install Commitlint + run: npm install --global @commitlint/{cli,config-conventional} + + - name: Lint PR Title + run: echo "${{ github.event.pull_request.title }}" | commitlint