Skip to content

Commit 24f9a30

Browse files
authored
feat: add labeler action (#268)
* feat: add labeler action * fix: fix nginx-one path * feat: add filters for Unit and potential include paths
1 parent 3392ec0 commit 24f9a30

File tree

2 files changed

+140
-0
lines changed

2 files changed

+140
-0
lines changed

.github/labeler.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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:
43+
- 'content/nap-dos/**'
44+
- 'content/includes/nap-dos/**'
45+
46+
product/nap-waf:
47+
- changed-files:
48+
- any-glob-to-any-file:
49+
- 'content/nap-waf/**'
50+
- 'content/includes/nap-waf/**'
51+
52+
product/ngf:
53+
- changed-files:
54+
- any-glob-to-any-file:
55+
- 'content/ngf/**'
56+
- 'content/includes/ngf/**'
57+
58+
product/nginx-plus:
59+
- changed-files:
60+
- any-glob-to-any-file:
61+
- 'content/nginx/**'
62+
- 'content/includes/nginx-plus/**'
63+
64+
product/nginx-one:
65+
- changed-files:
66+
- any-glob-to-any-file:
67+
- 'content/nginx-one/**'
68+
- 'content/includes/nginx-one/**'
69+
70+
product/nginxaas:
71+
- changed-files:
72+
- any-glob-to-any-file:
73+
- 'content/nginxaas-azure/**'
74+
- 'content/includes/nginxaas-azure/**'
75+
76+
product/nim:
77+
- changed-files:
78+
- any-glob-to-any-file:
79+
- 'content/nim/**'
80+
- 'content/includes/nim/**'
81+
82+
product/nms:
83+
- changed-files:
84+
- any-glob-to-any-file:
85+
- 'content/nms/**'
86+
- 'content/includes/nms/**'
87+
88+
product/unit:
89+
- changed-files:
90+
- any-glob-to-any-file:
91+
- 'content/unit/**'
92+
- 'content/includes/unit/**'
93+
94+
# Other labels
95+
96+
process documentation:
97+
- changed-files:
98+
- any-glob-to-any-file:
99+
- 'templates/**'
100+
- '*.md'
101+
- 'LICENSE'
102+
103+
tooling:
104+
- changed-files:
105+
- any-glob-to-any-file:
106+
- 'layouts/**'
107+
- '.github/**'
108+
- '.cloudcannon/**'
109+
- 'styles/**'
110+
- 'layouts/**'
111+
- 'config/**'
112+
- 'archetypes/**'
113+
- '*.yml'
114+
- '*.yaml'
115+
- '*.json'
116+
- '*.ts'
117+
- '*.sh'
118+
- '*.js'
119+
- 'Makefile'
120+
- '.vale.ini'
121+
- '.gitignore'
122+
- '.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)