Skip to content

The agent engineering platform.

feat(infra): add PR labeler configurations and workflows (#33031)

Mason Daugherty5b418d3f2638
diff --git a/.github/labeler.yml b/.github/labeler.yml
new file mode 100644
index 0000000000..7ffab69b36
--- /dev/null
+++ b/.github/labeler.yml
@@ -0,0 +1,80 @@
+# GitHub PR Labeler Configuration for LangChain
+# Automatically applies labels based on changed files and branch patterns
+
+# Core packages
+core:
+ - changed-files:
+ - any-glob-to-any-file:
+ - "libs/core/**/*"
+
+langchain:
+ - changed-files:
+ - any-glob-to-any-file:
+ - "libs/langchain/**/*"
+ - "libs/langchain_v1/**/*"
+
+v1:
+ - changed-files:
+ - any-glob-to-any-file:
+ - "libs/langchain_v1/**/*"
+
+cli:
+ - changed-files:
+ - any-glob-to-any-file:
+ - "libs/cli/**/*"
+
+standard-tests:
+ - changed-files:
+ - any-glob-to-any-file:
+ - "libs/standard-tests/**/*"
+
+# Partner integrations
+integration:
+ - changed-files:
+ - any-glob-to-any-file:
+ - "libs/partners/**/*"
+
+# Infrastructure and DevOps
+infra:
+ - changed-files:
+ - any-glob-to-any-file:
+ - ".github/**/*"
+ - "Makefile"
+ - ".pre-commit-config.yaml"
+ - "scripts/**/*"
+ - "docker/**/*"
+ - "Dockerfile*"
+
+github_actions:
+ - changed-files:
+ - any-glob-to-any-file:
+ - ".github/workflows/**/*"
+ - ".github/actions/**/*"
+
+dependencies:
+ - changed-files:
+ - any-glob-to-any-file:
+ - "**/pyproject.toml"
+ - "uv.lock"
+ - "**/requirements*.txt"
+ - "**/poetry.lock"
+
+# Documentation
+documentation:
+ - changed-files:
+ - any-glob-to-any-file:
+ - "docs/**/*"
+ - "**/*.md"
+ - "**/*.rst"
+ - "**/README*"
+
+# Security related changes
+security:
+ - changed-files:
+ - any-glob-to-any-file:
+ - "**/*security*"
+ - "**/*auth*"
+ - "**/*credential*"
+ - "**/*secret*"
+ - "**/*token*"
+ - ".github/workflows/security*"
diff --git a/.github/pr-title-labeler.yml b/.github/pr-title-labeler.yml
new file mode 100644
index 0000000000..1d0c71de5f
--- /dev/null
+++ b/.github/pr-title-labeler.yml
@@ -0,0 +1,27 @@
+# PR Title Labeler Configuration
+# Labels PRs based on conventional commit patterns in titles
+# Format: type(scope): description or type!: description (breaking)
+
+add-missing-labels: true
+include-commits: false
+include-title: true
+label-for-breaking-changes: breaking
+
+label-mapping:
+ # Features and enhancements
+ feature: ["feat"]
+
+ # Bug fixes
+ fix: ["fix"]
+
+ # Documentation
+ documentation: ["docs"]
+
+ # Infrastructure and tooling
+ infra: ["chore", "ci", "build", "infra"]
+
+ # Integration partners - detected by scope
+ integration: ["anthropic", "chroma", "deepseek", "exa", "fireworks", "groq", "huggingface", "mistralai", "nomic", "ollama", "openai", "perplexity", "prompty", "qdrant", "xai"]
+
+ # Releases
+ release: ["release"]
diff --git a/.github/workflows/check_diffs.yml b/.github/workflows/check_diffs.yml
index ccf70e7e86..37eabe5583 100644
--- a/.github/workflows/check_diffs.yml
+++ b/.github/workflows/check_diffs.yml
@@ -111,6 +111,7 @@ jobs:
# Verify integration tests compile without actually running them (faster feedback)
compile-integration-tests:
+ name: 'Compile Integration Tests'
needs: [ build ]
if: ${{ needs.build.outputs.compile-integration-tests != '[]' }}
strategy:
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
new file mode 100644
index 0000000000..acb85c01da
--- /dev/null
+++ b/.github/workflows/labeler.yml
@@ -0,0 +1,22 @@
+name: "🏷️ Pull Request Labeler"
+
+on:
+ pull_request_target:
+ types: [opened, synchronize, reopened]
+
+jobs:
+ labeler:
+ name: 'label'
+ permissions:
+ contents: read
+ pull-requests: write
+ issues: write
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Label Pull Request
+ uses: actions/labeler@v6
+ with:
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
+ configuration-path: .github/labeler.yml
+ sync-labels: true
diff --git a/.github/workflows/pr_lint.yml b/.github/workflows/pr_lint.yml
index f154f10fae..1adca68042 100644
--- a/.github/workflows/pr_lint.yml
+++ b/.github/workflows/pr_lint.yml
@@ -26,7 +26,7 @@
# • release — prepare a new release
#
# Allowed Scopes (optional):
-# core, cli, langchain, langchain_v1, langchain_legacy, standard-tests,
+# core, cli, langchain, langchain_v1, langchain_legacy, standard-tests,
# text-splitters, docs, anthropic, chroma, deepseek, exa, fireworks, groq,
# huggingface, mistralai, nomic, ollama, openai, perplexity, prompty, qdrant,
# xai, infra
@@ -59,7 +59,7 @@ on:
jobs:
# Validates that PR title follows Conventional Commits specification
lint-pr-title:
- name: 'Validate PR Title Format'
+ name: 'validate format'
runs-on: ubuntu-latest
steps:
- name: '✅ Validate Conventional Commits Format'
diff --git a/.github/workflows/pr_title_labeler.yml b/.github/workflows/pr_title_labeler.yml
new file mode 100644
index 0000000000..d5aa8e6c7b
--- /dev/null
+++ b/.github/workflows/pr_title_labeler.yml
@@ -0,0 +1,21 @@
+name: "🏷️ PR Title Labeler"
+
+on:
+ pull_request:
+ types: [opened, synchronize, reopened, edited]
+
+jobs:
+ pr-title-labeler:
+ name: 'label'
+ permissions:
+ contents: read
+ pull-requests: write
+ issues: write
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Label PR based on title
+ uses: grafana/[email protected]
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ configuration-path: .github/pr-title-labeler.yml