Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 0 additions & 92 deletions .github/workflows/conventional-commits-lint.js

This file was deleted.

46 changes: 14 additions & 32 deletions .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,28 @@
name: Check pull requests
# See https://github.com/amannn/action-semantic-pull-request
name: 'PR Title is Conventional'

on:
push:
branches-ignore: # Run the checks on all branches but the protected ones
- main
- release/*

pull_request:
branches:
- main
- release/*
types:
- opened
- edited
- reopened
- ready_for_review
- synchronize

permissions:
pull-requests: write
contents: read

jobs:
check-conventional-commits:
main:
name: Validate PR title
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
sparse-checkout: |
.github

- if: ${{ github.event_name == 'pull_request' }}
run: |
set -ex

node .github/workflows/conventional-commits-lint.js pr <<EOF
${{ toJSON(github.event) }}
EOF

- if: ${{ github.event_name == 'push' }}
run: |
set -ex

node .github/workflows/conventional-commits-lint.js push <<EOF
${{ toJSON(github.event) }}
EOF
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
The subject "{subject}" found in the pull request title "{title}"
didn't match the configured pattern. Please ensure that the subject
doesn't start with an uppercase character.