|
| 1 | +# ----------------------------------------------------------------------------- |
| 2 | +# PR Title Lint Workflow |
| 3 | +# |
| 4 | +# Purpose: |
| 5 | +# Enforces Conventional Commits format for pull request titles to maintain a |
| 6 | +# clear, consistent, and machine-readable change history across our repository. |
| 7 | +# |
| 8 | +# Enforced Commit Message Format (Conventional Commits 1.0.0): |
| 9 | +# <type>[optional scope]: <description> |
| 10 | +# [optional body] |
| 11 | +# [optional footer(s)] |
| 12 | +# |
| 13 | +# Allowed Types: |
| 14 | +# • feat — a new feature (MINOR bump) |
| 15 | +# • fix — a bug fix (PATCH bump) |
| 16 | +# • docs — documentation only changes |
| 17 | +# • style — formatting, missing semi-colons, etc.; no code change |
| 18 | +# • refactor — code change that neither fixes a bug nor adds a feature |
| 19 | +# • perf — code change that improves performance |
| 20 | +# • test — adding missing tests or correcting existing tests |
| 21 | +# • build — changes that affect the build system or external dependencies |
| 22 | +# • ci — continuous integration/configuration changes |
| 23 | +# • chore — other changes that don't modify src or test files |
| 24 | +# • revert — reverts a previous commit |
| 25 | +# • release — prepare a new release |
| 26 | +# |
| 27 | +# Allowed Scopes (optional): |
| 28 | +# core, cli, langchain, standard-tests, docs, anthropic, chroma, deepseek, |
| 29 | +# exa, fireworks, groq, huggingface, mistralai, nomic, ollama, openai, |
| 30 | +# perplexity, prompty, qdrant, xai |
| 31 | +# |
| 32 | +# Rules & Tips for New Committers: |
| 33 | +# 1. Subject (type) must start with a lowercase letter and, if possible, be |
| 34 | +# followed by a scope wrapped in parenthesis `(scope)` |
| 35 | +# 2. Breaking changes: |
| 36 | +# – Append "!" after type/scope (e.g., feat!: drop Node 12 support) |
| 37 | +# – Or include a footer "BREAKING CHANGE: <details>" |
| 38 | +# 3. Example PR titles: |
| 39 | +# feat(core): add multi‐tenant support |
| 40 | +# fix(cli): resolve flag parsing error |
| 41 | +# docs: update API usage examples |
| 42 | +# docs(openai): update API usage examples |
| 43 | +# |
| 44 | +# Resources: |
| 45 | +# • Conventional Commits spec: https://www.conventionalcommits.org/en/v1.0.0/ |
| 46 | +# ----------------------------------------------------------------------------- |
| 47 | + |
| 48 | +name: PR Title Lint |
| 49 | + |
| 50 | +permissions: |
| 51 | + pull-requests: read |
| 52 | + |
| 53 | +on: |
| 54 | + pull_request: |
| 55 | + types: [opened, edited, synchronize] |
| 56 | + |
| 57 | +jobs: |
| 58 | + lint-pr-title: |
| 59 | + name: Validate PR Title |
| 60 | + runs-on: ubuntu-latest |
| 61 | + steps: |
| 62 | + - name: Validate PR Title |
| 63 | + uses: amannn/action-semantic-pull-request@v5 |
| 64 | + env: |
| 65 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 66 | + with: |
| 67 | + types: | |
| 68 | + feat |
| 69 | + fix |
| 70 | + docs |
| 71 | + style |
| 72 | + refactor |
| 73 | + perf |
| 74 | + test |
| 75 | + build |
| 76 | + ci |
| 77 | + chore |
| 78 | + revert |
| 79 | + release |
| 80 | + scopes: | |
| 81 | + core |
| 82 | + cli |
| 83 | + langchain |
| 84 | + standard-tests |
| 85 | + docs |
| 86 | + anthropic |
| 87 | + chroma |
| 88 | + deepseek |
| 89 | + exa |
| 90 | + fireworks |
| 91 | + groq |
| 92 | + huggingface |
| 93 | + mistralai |
| 94 | + nomic |
| 95 | + ollama |
| 96 | + openai |
| 97 | + perplexity |
| 98 | + prompty |
| 99 | + qdrant |
| 100 | + xai |
| 101 | + requireScope: false |
| 102 | + disallowScopes: | |
| 103 | + release |
| 104 | + [A-Z]+ |
| 105 | + subjectPattern: ^(?![A-Z]).+$ |
| 106 | + subjectPatternError: | |
| 107 | + The subject "{subject}" found in the pull request title "{title}" |
| 108 | + didn't match the configured pattern. Please ensure that the subject |
| 109 | + doesn't start with an uppercase character. |
| 110 | + ignoreLabels: | |
| 111 | + ignore-lint-pr-title |
0 commit comments