Skip to content

Commit 5b418d3

Browse files
authored
feat(infra): add PR labeler configurations and workflows (#33031)
1 parent 6b4054c commit 5b418d3

File tree

6 files changed

+153
-2
lines changed

6 files changed

+153
-2
lines changed

.github/labeler.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# GitHub PR Labeler Configuration for LangChain
2+
# Automatically applies labels based on changed files and branch patterns
3+
4+
# Core packages
5+
core:
6+
- changed-files:
7+
- any-glob-to-any-file:
8+
- "libs/core/**/*"
9+
10+
langchain:
11+
- changed-files:
12+
- any-glob-to-any-file:
13+
- "libs/langchain/**/*"
14+
- "libs/langchain_v1/**/*"
15+
16+
v1:
17+
- changed-files:
18+
- any-glob-to-any-file:
19+
- "libs/langchain_v1/**/*"
20+
21+
cli:
22+
- changed-files:
23+
- any-glob-to-any-file:
24+
- "libs/cli/**/*"
25+
26+
standard-tests:
27+
- changed-files:
28+
- any-glob-to-any-file:
29+
- "libs/standard-tests/**/*"
30+
31+
# Partner integrations
32+
integration:
33+
- changed-files:
34+
- any-glob-to-any-file:
35+
- "libs/partners/**/*"
36+
37+
# Infrastructure and DevOps
38+
infra:
39+
- changed-files:
40+
- any-glob-to-any-file:
41+
- ".github/**/*"
42+
- "Makefile"
43+
- ".pre-commit-config.yaml"
44+
- "scripts/**/*"
45+
- "docker/**/*"
46+
- "Dockerfile*"
47+
48+
github_actions:
49+
- changed-files:
50+
- any-glob-to-any-file:
51+
- ".github/workflows/**/*"
52+
- ".github/actions/**/*"
53+
54+
dependencies:
55+
- changed-files:
56+
- any-glob-to-any-file:
57+
- "**/pyproject.toml"
58+
- "uv.lock"
59+
- "**/requirements*.txt"
60+
- "**/poetry.lock"
61+
62+
# Documentation
63+
documentation:
64+
- changed-files:
65+
- any-glob-to-any-file:
66+
- "docs/**/*"
67+
- "**/*.md"
68+
- "**/*.rst"
69+
- "**/README*"
70+
71+
# Security related changes
72+
security:
73+
- changed-files:
74+
- any-glob-to-any-file:
75+
- "**/*security*"
76+
- "**/*auth*"
77+
- "**/*credential*"
78+
- "**/*secret*"
79+
- "**/*token*"
80+
- ".github/workflows/security*"

.github/pr-title-labeler.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# PR Title Labeler Configuration
2+
# Labels PRs based on conventional commit patterns in titles
3+
# Format: type(scope): description or type!: description (breaking)
4+
5+
add-missing-labels: true
6+
include-commits: false
7+
include-title: true
8+
label-for-breaking-changes: breaking
9+
10+
label-mapping:
11+
# Features and enhancements
12+
feature: ["feat"]
13+
14+
# Bug fixes
15+
fix: ["fix"]
16+
17+
# Documentation
18+
documentation: ["docs"]
19+
20+
# Infrastructure and tooling
21+
infra: ["chore", "ci", "build", "infra"]
22+
23+
# Integration partners - detected by scope
24+
integration: ["anthropic", "chroma", "deepseek", "exa", "fireworks", "groq", "huggingface", "mistralai", "nomic", "ollama", "openai", "perplexity", "prompty", "qdrant", "xai"]
25+
26+
# Releases
27+
release: ["release"]

.github/workflows/check_diffs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jobs:
111111

112112
# Verify integration tests compile without actually running them (faster feedback)
113113
compile-integration-tests:
114+
name: 'Compile Integration Tests'
114115
needs: [ build ]
115116
if: ${{ needs.build.outputs.compile-integration-tests != '[]' }}
116117
strategy:

.github/workflows/labeler.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "🏷️ Pull Request Labeler"
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
labeler:
9+
name: 'label'
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
issues: write
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Label Pull Request
18+
uses: actions/labeler@v6
19+
with:
20+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
21+
configuration-path: .github/labeler.yml
22+
sync-labels: true

.github/workflows/pr_lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# • release — prepare a new release
2727
#
2828
# Allowed Scopes (optional):
29-
# core, cli, langchain, langchain_v1, langchain_legacy, standard-tests,
29+
# core, cli, langchain, langchain_v1, langchain_legacy, standard-tests,
3030
# text-splitters, docs, anthropic, chroma, deepseek, exa, fireworks, groq,
3131
# huggingface, mistralai, nomic, ollama, openai, perplexity, prompty, qdrant,
3232
# xai, infra
@@ -59,7 +59,7 @@ on:
5959
jobs:
6060
# Validates that PR title follows Conventional Commits specification
6161
lint-pr-title:
62-
name: 'Validate PR Title Format'
62+
name: 'validate format'
6363
runs-on: ubuntu-latest
6464
steps:
6565
- name: '✅ Validate Conventional Commits Format'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "🏷️ PR Title Labeler"
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
jobs:
8+
pr-title-labeler:
9+
name: 'label'
10+
permissions:
11+
contents: read
12+
pull-requests: write
13+
issues: write
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Label PR based on title
18+
uses: grafana/[email protected]
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
configuration-path: .github/pr-title-labeler.yml

0 commit comments

Comments
 (0)