-
-
Notifications
You must be signed in to change notification settings - Fork 94
Expand file tree
/
Copy pathlabeler.yml
More file actions
160 lines (138 loc) · 4.92 KB
/
labeler.yml
File metadata and controls
160 lines (138 loc) · 4.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# Automatically adds labels to issues or pull requests based on content or file changes.
# .github/labeler.yml
#
# This file configures the GitHub "labeler" action.
# It automatically adds labels to pull requests based on:
# - which files were changed (changed-files)
# - the PR title or description (title, body)
#
# IMPORTANT:
# - All label names used below (e.g. "go", "c", "docs") must exist
# as labels in the GitHub repository settings.
# - This file affects pull requests only (not individual commits).
# --------------------------------------------------------------------
# Label: AnyChange
# --------------------------------------------------------------------
# Purpose:
# - Add a very generic label to any pull request that touches any file.
# - This can be useful if you want to trigger other automations or
# simply mark “this PR changes something”.
#
# When is it applied?
# - Whenever *any* file in the repository is changed.
AnyChange:
- changed-files:
# Match any file in the repository.
- any-glob-to-any-file: '**'
# --------------------------------------------------------------------
# Label: go
# --------------------------------------------------------------------
# Purpose:
# - Mark pull requests that modify Go source files.
#
# When is it applied?
# - If any *.go file is changed anywhere in the repository.
go:
- changed-files:
- any-glob-to-any-file: '**/*.go'
# --------------------------------------------------------------------
# Label: c
# --------------------------------------------------------------------
# Purpose:
# - Mark pull requests that touch C source or header files.
#
# When is it applied?
# - If any *.c or *.h file is changed in typical C locations.
# - You can adjust the paths below to match your project layout.
c:
- changed-files:
# C sources and headers in src/
- any-glob-to-any-file: 'src/**/*.c'
- any-glob-to-any-file: 'src/**/*.h'
# C sources and headers in examples/
- any-glob-to-any-file: 'examples/**/*.c'
- any-glob-to-any-file: 'examples/**/*.h'
# C sources and headers in the _test directory
- any-glob-to-any-file: '_test/**/*.c'
- any-glob-to-any-file: '_test/**/*.h'
# --------------------------------------------------------------------
# Label: docs
# --------------------------------------------------------------------
# Purpose:
# - Mark pull requests that primarily modify documentation.
#
# When is it applied?
# - If files in docs/ are changed, or *.md files anywhere.
docs:
- changed-files:
# Any file inside the docs/ folder
- any-glob-to-any-file: 'docs/**'
# Any Markdown file (README, guides, etc.)
- any-glob-to-any-file: '**/*.md'
# --------------------------------------------------------------------
# Label: tests
# --------------------------------------------------------------------
# Purpose:
# - Mark pull requests that add or modify tests.
#
# When is it applied?
# - If Go test files or other test-related files are changed.
tests:
- changed-files:
# Go test files
- any-glob-to-any-file: '**/*_test.go'
# Any files inside a _test folder (C tests, configs, etc.)
- any-glob-to-any-file: '_test/**'
# --------------------------------------------------------------------
# Label: ci
# --------------------------------------------------------------------
# Purpose:
# - Mark pull requests that change Continuous Integration (CI)
# or GitHub-related configuration.
#
# When is it applied?
# - If files under .github/ are modified (workflows, templates, etc.).
ci:
- changed-files:
- any-glob-to-any-file: '.github/**'
# --------------------------------------------------------------------
# Label: fix
# --------------------------------------------------------------------
# Purpose:
# - Mark pull requests that appear to fix a bug.
#
# When is it applied?
# - If the PR title or description contains the word "fix".
# (Case-sensitive by default; if needed, you can switch to regex.)
#
# Note:
# - These matchers are very simple on purpose.
# - They work well with conventional commit messages such as:
# "fix: handle empty input"
fix:
# PR title contains "fix"
- title: 'fix'
# PR body (description) contains "fix"
- body: 'fix'
# --------------------------------------------------------------------
# Label: feature
# --------------------------------------------------------------------
# Purpose:
# - Mark pull requests that introduce new features.
#
# When is it applied?
# - If the PR title or description contains "feat" or "feature".
#
# Note:
# - This works nicely with conventional commit style messages like:
# "feat: add new logging options"
# "feature: support additional hardware"
feature:
# PR title contains "feat"
- title: 'feat'
# PR body contains "feat"
- body: 'feat'
# PR title contains "feature"
- title: 'feature'
# PR body contains "feature"
- body: 'feature'