Skip to content

Commit c4f252a

Browse files
authored
ci: add labels (#260)
1 parent 80cdf85 commit c4f252a

File tree

2 files changed

+94
-0
lines changed

2 files changed

+94
-0
lines changed

.github/labeler.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Configuration for GitHub Labeler Action
2+
# https://github.com/actions/labeler
3+
4+
# Documentation changes
5+
T-documentation:
6+
- changed-files:
7+
- any-glob-to-any-file: ['**/*.md', 'docs/**/*', '**/*.rst']
8+
9+
# Core library changes
10+
T-core:
11+
- changed-files:
12+
- any-glob-to-any-file: ['crates/rmcp/src/**/*']
13+
14+
# Macro changes
15+
T-macros:
16+
- changed-files:
17+
- any-glob-to-any-file: ['crates/rmcp-macros/**/*']
18+
19+
# Example changes
20+
T-examples:
21+
- changed-files:
22+
- any-glob-to-any-file: ['examples/**/*']
23+
24+
# CI/CD changes
25+
T-CI:
26+
- changed-files:
27+
- any-glob-to-any-file: ['.github/**/*', '**/*.yml', '**/*.yaml', '**/Dockerfile*']
28+
29+
# Dependencies
30+
T-dependencies:
31+
- changed-files:
32+
- any-glob-to-any-file: ['**/Cargo.toml', '**/Cargo.lock', '**/package.json', '**/package-lock.json', '**/requirements.txt', '**/pyproject.toml']
33+
34+
# Tests
35+
T-test:
36+
- changed-files:
37+
- any-glob-to-any-file: ['**/tests/**/*', '**/*test*.rs', '**/benches/**/*']
38+
39+
# Transport layer changes
40+
T-transport:
41+
- changed-files:
42+
- any-glob-to-any-file: ['crates/rmcp/src/transport/**/*']
43+
44+
# Service layer changes
45+
T-service:
46+
- changed-files:
47+
- any-glob-to-any-file: ['crates/rmcp/src/service/**/*']
48+
49+
# Handler changes
50+
T-handler:
51+
- changed-files:
52+
- any-glob-to-any-file: ['crates/rmcp/src/handler/**/*']
53+
54+
# Model changes
55+
T-model:
56+
- changed-files:
57+
- any-glob-to-any-file: ['crates/rmcp/src/model/**/*']
58+
59+
# Configuration files
60+
T-config:
61+
- changed-files:
62+
- any-glob-to-any-file: ['**/*.toml', '**/*.json', '**/*.yaml', '**/*.yml', '**/*.env*']
63+
64+
# Security related files
65+
T-security:
66+
- changed-files:
67+
- any-glob-to-any-file: ['**/security.md', '**/SECURITY.md', '**/audit.toml']

.github/workflows/auto-label-pr.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Auto Label PR
2+
on:
3+
# Runs workflow when activity on a PR in the workflow's repository occurs.
4+
pull_request_target:
5+
6+
jobs:
7+
auto-label:
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
12+
name: Assign labels
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
16+
# Required by gh
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
PR_URL: ${{ github.event.pull_request.html_url }}
20+
21+
steps:
22+
- uses: actions/labeler@v5
23+
with:
24+
# Auto-include paths starting with dot (e.g. .github)
25+
dot: true
26+
# Remove labels when matching files are reverted or no longer changed by the PR
27+
sync-labels: true

0 commit comments

Comments
 (0)