Skip to content

Commit 10cc6a6

Browse files
author
evelynmitchell
authored
Update labeler.yml
1 parent 2ef293b commit 10cc6a6

File tree

1 file changed

+50
-8
lines changed

1 file changed

+50
-8
lines changed

.github/labeler.yml

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,54 @@
11
# this is a config file for the github action labeler
22

3-
# Add 'label1' to any changes within 'example' folder or any subfolders
4-
example_change:
5-
- example/**
3+
# Add 'root' label to any root file changes
4+
# Quotation marks are required for the leading asterisk
5+
root:
6+
- changed-files:
7+
- any-glob-to-any-file: '*'
68

7-
# Add 'label2' to any file changes within 'example2' folder
8-
example2_change: example2/*
9+
# Add 'Documentation' label to any changes within 'docs' folder or any subfolders
10+
Documentation:
11+
- changed-files:
12+
- any-glob-to-any-file: docs/**
913

10-
# Add label3 to any change to .txt files within the entire repository. Quotation marks are required for the leading asterisk
11-
text_files:
12-
- '**/*.txt'
14+
# Add 'Tests' label to any file changes within 'docs' folder
15+
Tests:
16+
- changed-files:
17+
- any-glob-to-any-file: tests/*
18+
19+
# Add 'Documentation' label to any file changes within 'docs' or 'guides' folders
20+
ghactions:
21+
- changed-files:
22+
- any-glob-to-any-file:
23+
- .github/workflows/*
24+
- .github/*
25+
26+
# Add 'Scripts' label to any file changes within 'docs' folder
27+
Scripts:
28+
- changed-files:
29+
- any-glob-to-any-file: scripts/*
30+
31+
## Equivalent of the above mentioned configuration using another syntax
32+
Documentation:
33+
- changed-files:
34+
- any-glob-to-any-file: ['docs/*', 'guides/*']
35+
36+
# Add 'Documentation' label to any change to .md files within the entire repository
37+
Documentation:
38+
- changed-files:
39+
- any-glob-to-any-file: '**/*.md'
40+
41+
# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
42+
source:
43+
- all:
44+
- changed-files:
45+
- any-glob-to-any-file: 'src/**/*'
46+
- all-globs-to-all-files: '!src/docs/*'
47+
48+
# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name
49+
feature:
50+
- head-branch: ['^feature', 'feature']
51+
52+
# Add 'release' label to any PR that is opened against the `main` branch
53+
release:
54+
- base-branch: 'main'

0 commit comments

Comments
 (0)