mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-23 10:57:51 +00:00
There are a few problems with the NPM commitlint * NPM is problematic * Having to install NPM and commitlint and dependencies is slow and heavyweight * commitlint is overkill for our simple use case We have our own pr_title_lint.py which is small and works exactly for our use case. Enhance coderabbit checks for PRs and test cleanup Signed-off-by: Rich Megginson <rmeggins@redhat.com>
32 lines
819 B
YAML
32 lines
819 B
YAML
---
|
|
name: PR Title Lint
|
|
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@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install pr_title_lint.py
|
|
run: curl -o pr_title_lint.py https://raw.githubusercontent.com/linux-system-roles/auto-maintenance/main/pr_title_lint.py
|
|
|
|
- name: Run pr_title_lint.py on PR title
|
|
env:
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
# Echo from env variable to avoid bash errors with extra characters
|
|
run: python3 pr_title_lint.py "${PR_TITLE}"
|