Skip to content

Commit 5edbe70

Browse files
authored
add: labeler configuration for GitHub actions
1 parent 030a883 commit 5edbe70

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/labeler.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Add 'root' label to any root file changes
2+
# Quotation marks are required for the leading asterisk
3+
root:
4+
- changed-files:
5+
- any-glob-to-any-file: '*'
6+
7+
# Add 'AnyChange' label to any changes within the entire repository
8+
AnyChange:
9+
- changed-files:
10+
- any-glob-to-any-file: '**'
11+
12+
# Add 'Documentation' label to any changes within 'docs' folder or any subfolders
13+
Documentation:
14+
- changed-files:
15+
- any-glob-to-any-file: docs/**
16+
17+
# Add 'Documentation' label to any file changes within 'docs' folder
18+
Documentation:
19+
- changed-files:
20+
- any-glob-to-any-file: docs/*
21+
22+
# Add 'Documentation' label to any file changes within 'docs' or 'guides' folders
23+
Documentation:
24+
- changed-files:
25+
- any-glob-to-any-file:
26+
- docs/*
27+
- guides/*
28+
29+
## Equivalent of the above mentioned configuration using another syntax
30+
Documentation:
31+
- changed-files:
32+
- any-glob-to-any-file: ['docs/*', 'guides/*']
33+
34+
# Add 'Documentation' label to any change to .md files within the entire repository
35+
Documentation:
36+
- changed-files:
37+
- any-glob-to-any-file: '**/*.md'
38+
39+
# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
40+
source:
41+
- all:
42+
- changed-files:
43+
- any-glob-to-any-file: 'src/**/*'
44+
- all-globs-to-all-files: '!src/docs/*'
45+
46+
# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name
47+
feature:
48+
- head-branch: ['^feature', 'feature']
49+
50+
# Add 'release' label to any PR that is opened against the `main` branch
51+
release:
52+
- base-branch: 'main'

0 commit comments

Comments
 (0)