Skip to content

Commit 3f24859

Browse files
committed
feat: add labeler action
1 parent 6a2c2be commit 3f24859

File tree

2 files changed

+130
-0
lines changed

2 files changed

+130
-0
lines changed

.github/labeler.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Label PRs based on modified file paths (v5 format)
2+
# https://github.com/actions/labeler
3+
4+
# General documentation
5+
6+
documentation:
7+
- changed-files:
8+
- any-glob-to-any-file:
9+
- 'content/**'
10+
- 'assets/**'
11+
- 'static/**'
12+
- 'data/**'
13+
14+
# Product labels
15+
16+
product/agent:
17+
- changed-files:
18+
- any-glob-to-any-file:
19+
- 'content/agent/**'
20+
- 'content/includes/agent/**'
21+
22+
product/amplify:
23+
- changed-files:
24+
- any-glob-to-any-file: 'content/amplify/**'
25+
26+
product/controller:
27+
- changed-files:
28+
- any-glob-to-any-file:
29+
- 'content/controller/**'
30+
- 'content/includes/controller/**'
31+
32+
product/mesh:
33+
- changed-files:
34+
- any-glob-to-any-file: 'content/mesh/**'
35+
36+
product/modsec-waf:
37+
- changed-files:
38+
- any-glob-to-any-file: 'content/modsec-waf/**'
39+
40+
product/nap-dos:
41+
- changed-files:
42+
- any-glob-to-any-file: 'content/nap-dos/**'
43+
44+
product/nap-waf:
45+
- changed-files:
46+
- any-glob-to-any-file:
47+
- 'content/nap-waf/**'
48+
- 'content/includes/nap-waf/**'
49+
50+
product/ngf:
51+
- changed-files:
52+
- any-glob-to-any-file:
53+
- 'content/ngf/**'
54+
- 'content/includes/ngf/**'
55+
56+
product/nginx-plus:
57+
- changed-files:
58+
- any-glob-to-any-file:
59+
- 'content/nginx/**'
60+
- 'content/includes/nginx-plus/**'
61+
62+
product/nginx-one:
63+
- changed-files:
64+
- any-glob-to-any-file: 'content/nginx/**'
65+
66+
product/nginxaas:
67+
- changed-files:
68+
- any-glob-to-any-file:
69+
- 'content/nginxaas-azure/**'
70+
- 'content/includes/nginxaas-azure/**'
71+
72+
product/nim:
73+
- changed-files:
74+
- any-glob-to-any-file:
75+
- 'content/nim/**'
76+
- 'content/includes/nim/**'
77+
78+
product/nms:
79+
- changed-files:
80+
- any-glob-to-any-file:
81+
- 'content/nms/**'
82+
- 'content/includes/nms/**'
83+
84+
# Other labels
85+
86+
process documentation:
87+
- changed-files:
88+
- any-glob-to-any-file:
89+
- 'templates/**'
90+
- '*.md'
91+
- 'LICENSE'
92+
93+
tooling:
94+
- changed-files:
95+
- any-glob-to-any-file:
96+
- 'layouts/**'
97+
- '.github/**'
98+
- '.cloudcannon/**'
99+
- 'styles/**'
100+
- 'layouts/**'
101+
- 'config/**'
102+
- 'archetypes/**'
103+
- '*.yml'
104+
- '*.yaml'
105+
- '*.json'
106+
- '*.ts'
107+
- '*.sh'
108+
- '*.js'
109+
- 'Makefile'
110+
- '.vale.ini'
111+
- '.gitignore'
112+
- '.gitattributes'

.github/workflows/labeler.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: PR Labeler
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read # Required to read the labeler.yml file
9+
pull-requests: write # Required to apply labels to PRs
10+
11+
jobs:
12+
label:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Apply labels based on file paths
16+
uses: actions/labeler@v5
17+
with:
18+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)