From c026a71a06569772723084ebc8c4f6631eba064b Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Wed, 9 Jul 2025 15:04:25 -0400 Subject: [PATCH] chore: add PR title linting (#31943) --- .github/workflows/pr_lint.yml | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/pr_lint.yml diff --git a/.github/workflows/pr_lint.yml b/.github/workflows/pr_lint.yml new file mode 100644 index 00000000000..71c502d5b0a --- /dev/null +++ b/.github/workflows/pr_lint.yml @@ -0,0 +1,64 @@ +name: PR Title Lint + +permissions: + pull-requests: read + +on: + pull_request: + types: [opened, edited, synchronize] + +jobs: + lint-pr-title: + name: Validate PR Title + runs-on: ubuntu-latest + steps: + - name: Validate PR Title + uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + feat + fix + docs + style + refactor + perf + test + build + ci + chore + revert + release + scopes: | + core + cli + langchain + standard-tests + docs + anthropic + chroma + deepseek + exa + fireworks + groq + huggingface + mistralai + nomic + ollama + openai + perplexity + prompty + qdrant + xai + requireScope: false + disallowScopes: | + release + [A-Z]+ + subjectPattern: ^(?![A-Z]).+$ + subjectPatternError: | + The subject "{subject}" found in the pull request title "{title}" + didn't match the configured pattern. Please ensure that the subject + doesn't start with an uppercase character. + ignoreLabels: | + ignore-lint-pr-title \ No newline at end of file