ci: add labels (#260)
This commit is contained in:
parent
80cdf85e1a
commit
c4f252a21d
2 changed files with 94 additions and 0 deletions
67
.github/labeler.yml
vendored
Normal file
67
.github/labeler.yml
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
# Configuration for GitHub Labeler Action
|
||||||
|
# https://github.com/actions/labeler
|
||||||
|
|
||||||
|
# Documentation changes
|
||||||
|
T-documentation:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['**/*.md', 'docs/**/*', '**/*.rst']
|
||||||
|
|
||||||
|
# Core library changes
|
||||||
|
T-core:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['crates/rmcp/src/**/*']
|
||||||
|
|
||||||
|
# Macro changes
|
||||||
|
T-macros:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['crates/rmcp-macros/**/*']
|
||||||
|
|
||||||
|
# Example changes
|
||||||
|
T-examples:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['examples/**/*']
|
||||||
|
|
||||||
|
# CI/CD changes
|
||||||
|
T-CI:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['.github/**/*', '**/*.yml', '**/*.yaml', '**/Dockerfile*']
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
T-dependencies:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['**/Cargo.toml', '**/Cargo.lock', '**/package.json', '**/package-lock.json', '**/requirements.txt', '**/pyproject.toml']
|
||||||
|
|
||||||
|
# Tests
|
||||||
|
T-test:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['**/tests/**/*', '**/*test*.rs', '**/benches/**/*']
|
||||||
|
|
||||||
|
# Transport layer changes
|
||||||
|
T-transport:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['crates/rmcp/src/transport/**/*']
|
||||||
|
|
||||||
|
# Service layer changes
|
||||||
|
T-service:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['crates/rmcp/src/service/**/*']
|
||||||
|
|
||||||
|
# Handler changes
|
||||||
|
T-handler:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['crates/rmcp/src/handler/**/*']
|
||||||
|
|
||||||
|
# Model changes
|
||||||
|
T-model:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['crates/rmcp/src/model/**/*']
|
||||||
|
|
||||||
|
# Configuration files
|
||||||
|
T-config:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['**/*.toml', '**/*.json', '**/*.yaml', '**/*.yml', '**/*.env*']
|
||||||
|
|
||||||
|
# Security related files
|
||||||
|
T-security:
|
||||||
|
- changed-files:
|
||||||
|
- any-glob-to-any-file: ['**/security.md', '**/SECURITY.md', '**/audit.toml']
|
||||||
27
.github/workflows/auto-label-pr.yml
vendored
Normal file
27
.github/workflows/auto-label-pr.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
name: Auto Label PR
|
||||||
|
on:
|
||||||
|
# Runs workflow when activity on a PR in the workflow's repository occurs.
|
||||||
|
pull_request_target:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
auto-label:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
name: Assign labels
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
|
|
||||||
|
# Required by gh
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/labeler@v5
|
||||||
|
with:
|
||||||
|
# Auto-include paths starting with dot (e.g. .github)
|
||||||
|
dot: true
|
||||||
|
# Remove labels when matching files are reverted or no longer changed by the PR
|
||||||
|
sync-labels: true
|
||||||
Loading…
Reference in a new issue