mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 10:25:28 +00:00
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 Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
30 lines
668 B
YAML
30 lines
668 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
|