mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-22 19:09:57 +00:00
feat(infra): add PR labeler configurations and workflows (#33031)
This commit is contained in:
80
.github/labeler.yml
vendored
Normal file
80
.github/labeler.yml
vendored
Normal file
@@ -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*"
|
27
.github/pr-title-labeler.yml
vendored
Normal file
27
.github/pr-title-labeler.yml
vendored
Normal file
@@ -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"]
|
1
.github/workflows/check_diffs.yml
vendored
1
.github/workflows/check_diffs.yml
vendored
@@ -111,6 +111,7 @@ jobs:
|
|||||||
|
|
||||||
# Verify integration tests compile without actually running them (faster feedback)
|
# Verify integration tests compile without actually running them (faster feedback)
|
||||||
compile-integration-tests:
|
compile-integration-tests:
|
||||||
|
name: 'Compile Integration Tests'
|
||||||
needs: [ build ]
|
needs: [ build ]
|
||||||
if: ${{ needs.build.outputs.compile-integration-tests != '[]' }}
|
if: ${{ needs.build.outputs.compile-integration-tests != '[]' }}
|
||||||
strategy:
|
strategy:
|
||||||
|
22
.github/workflows/labeler.yml
vendored
Normal file
22
.github/workflows/labeler.yml
vendored
Normal file
@@ -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
|
4
.github/workflows/pr_lint.yml
vendored
4
.github/workflows/pr_lint.yml
vendored
@@ -26,7 +26,7 @@
|
|||||||
# • release — prepare a new release
|
# • release — prepare a new release
|
||||||
#
|
#
|
||||||
# Allowed Scopes (optional):
|
# 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,
|
# text-splitters, docs, anthropic, chroma, deepseek, exa, fireworks, groq,
|
||||||
# huggingface, mistralai, nomic, ollama, openai, perplexity, prompty, qdrant,
|
# huggingface, mistralai, nomic, ollama, openai, perplexity, prompty, qdrant,
|
||||||
# xai, infra
|
# xai, infra
|
||||||
@@ -59,7 +59,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
# Validates that PR title follows Conventional Commits specification
|
# Validates that PR title follows Conventional Commits specification
|
||||||
lint-pr-title:
|
lint-pr-title:
|
||||||
name: 'Validate PR Title Format'
|
name: 'validate format'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: '✅ Validate Conventional Commits Format'
|
- name: '✅ Validate Conventional Commits Format'
|
||||||
|
21
.github/workflows/pr_title_labeler.yml
vendored
Normal file
21
.github/workflows/pr_title_labeler.yml
vendored
Normal file
@@ -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/pr-labeler-action@v0.1.0
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
configuration-path: .github/pr-title-labeler.yml
|
Reference in New Issue
Block a user