ansible-sshd/.github/workflows/commitlint.yml
Sergei Petrosian 1a7d995b96 ci: Add pull request template and run commitlint on PR title only
We now ensure the conventional commits format only on PR titles and not
on
commits to let developers keep commit messages targeted for other
developers
i.e. describe actual changes to code that users should not care about.
And PR titles, on the contrary, must be aimed at end users.

For more info, see
https://linux-system-roles.github.io/contribute.html#write-a-good-pr-title-and-description
2023-06-15 11:33:51 +02:00

31 lines
669 B
YAML

name: Commitlint
on: # yamllint disable-line rule:truthy
pull_request:
types:
- opened
- synchronize
- reopened
- edited
merge_group:
branches:
- main
types:
- checks_requested
permissions:
contents: read
jobs:
commit-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install conventional-commit linter
run: npm install @commitlint/config-conventional @commitlint/cli
- name: Run commitlint on PR title
run: >-
echo '${{ github.event.pull_request.title }}' |
npx commitlint --verbose