Skip to content

feat: Redesign architecture and embrace Lightning native patterns #51

feat: Redesign architecture and embrace Lightning native patterns

feat: Redesign architecture and embrace Lightning native patterns #51

name: "Check PR title"
on:
pull_request:
types: [edited, opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
statuses: write
jobs:
pr-title-check:
runs-on: ubuntu-latest
timeout-minutes: 5
if: ${{ github.event.pull_request.user.login != 'allcontributors[bot]' }}
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Require imperative mood (e.g. "Add feature" not "Adds feature")
# ^ Start of string
# [A-Z] First character must be an uppercase ASCII letter
# [a-z]* Followed by zero or more lowercase letters
# (?<![^s]s) Negative lookbehind: disallow single 's' at end of first word
# ( .+)+ At least one space and one or more characters
# [^.] Final character must not be a period
# $ End of string
subjectPattern: '^[A-Z][a-z]*(?<![^s]s)( .+)+[^.]$'
subjectPatternError: |
The PR title must use imperative mood and proper formatting:
- Start with uppercase letter (e.g., "Add" not "add")
- Use base form of verb (e.g., "Add" not "Adds" or "Adding")
- Have multiple words (minimum 10 characters)
- Not end with a period
Valid: "Add new feature", "Fix bug in parser"
Invalid: "add feature", "Adds feature", "Add.", "Fix"
# Disable type prefixes (we don't use conventional commits format)
requireScope: false
ignoreLabels: |
ignore-title-check