-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautolabels.yml
98 lines (82 loc) · 3.31 KB
/
autolabels.yml
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
# This defines a static static label named 'example-label' with the given props.
example-label:
color: blue
description: This is a simple example static label.
# This defines two "namespaced" labels named: label-prefix/sublabel-{1,2}.
label-prefix:
sublabel-1:
color: blue
description: This is a simple first sublabel.
sublabel-2:
color: d73a4a
description: |
This is a simple second sublabel with a custom RGB color code.
# This will define as many labels as there are filepath regex matches.
label-for-sample-file-{files.name_regex.groups[0]}:
color: red
# NOTE: "match" will contain the entire match.
description: This label was created for file '{files.name_regex.match}'.
selectors:
files:
# This will specify a regex to be matched against full filepaths in
# the repo tree. 'files-name-group-0' will be the entire filename.
name_regex: "samples/(.*).yaml"
# TODO(aznashwan):
# type: "<binary|text>"
# size: min/max filesizes for some "kind/bigblob"-type label combos?
# This will define a label named "bug" which will automatically be
# associated with issues/PRs matching the provided regexes.
bug:
color: red
description: This label signifies the Issue/PR is about a bug.
selectors:
# This will make the label be applied to PRs/Issues whose titles/descriptions
# match the given regex. (in this case, some simple keywords)
title: "(issue|bug|fix|problem|failure|error)"
description: "(issue|bug|problem|failure|error)"
# This will make the label applied to PRs/Issues where anyone comments
# the given magic string on a single line within the comment.
comments: "(confirm|reproduced)"
# Only allows maintainers to add this label via comment. (default is true)
maintainer_comments: "^(/label-me-as bug)$"
manual-{maintainer_comments.groups[1]}:
color: green
description: "This label was defined through a maintainer comment with: {maintainer_comments.match}"
selectors:
maintainer_comments: "^(/label-me-as ([\\-a-z]+))$"
# This will define two labels named "pr-size-measure/{small,large}" that will
# automatically get applied to Pull Requsts whose change counts match.
pr-size-measure:
small:
color: teal
description: |
This PR is between {diff.min} and {diff.max} lines of code.
selectors:
diff:
type: total # Can be: additions/deletions/total/net (net = additions - deletions)
min: 1
max: 1000
large:
color: teal
description: |
This PR is between {diff.min} and {diff.max} lines of code.
selectors:
diff:
min: 1000
max: 10000
too-big:
color: red
description: |
This PR has more than {diff.min} lines and must be broken down into smaller PRs.
selectors:
diff:
# NOTE: omitting 'max/min' will set the bounds to +/- Infinity respectively.
min: 10000
action:
# Will only trigger on PRs if the 'diff' selector returns a match.
perform: close
# NOTE: can include markdown directives in reply comment.
comment: |
Thank you for your contribution to our project! :smile:
Unfortunately, this PR is *too large to be reviewed effectively*. :disappointed:
Please break down the changes into individual PRs no larger than {diff.min} lines.