Skip to content

Commit 6562050

Browse files
authored
Merge pull request #3218 from github/henrymercer/pr-sizes
Add experimental functionality for labelling PRs by their size
2 parents d88a554 + e9daf5b commit 6562050

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed

.github/sizeup.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
labeling:
2+
applyCategoryLabels: true
3+
categoryLabelPrefix: "size/"
4+
5+
commenting:
6+
addCommentWhenScoreThresholdHasBeenExceeded: false
7+
8+
sizeup:
9+
categories:
10+
- name: extra small
11+
lte: 25
12+
label:
13+
name: XS
14+
description: Should be very easy to review
15+
color: 3cbf00
16+
- name: small
17+
lte: 100
18+
label:
19+
name: S
20+
description: Should be easy to review
21+
color: 5d9801
22+
- name: medium
23+
lte: 250
24+
label:
25+
name: M
26+
description: Should be of average difficulty to review
27+
color: 7f7203
28+
- name: large
29+
lte: 500
30+
label:
31+
name: L
32+
description: May be hard to review
33+
color: a14c05
34+
- name: extra large
35+
lte: 1000
36+
label:
37+
name: XL
38+
description: May be very hard to review
39+
color: c32607
40+
- name: extra extra large
41+
label:
42+
name: XXL
43+
description: May be extremely hard to review
44+
color: e50009
45+
ignoredFilePatterns:
46+
- ".github/workflows/__*"
47+
- "lib/**/*"
48+
- "package-lock.json"
49+
testFilePatterns:
50+
- "**/*.test.ts"
51+
scoring:
52+
# This formula and the aliases below it are written in prefix notation.
53+
# For an explanation of how this works, please see:
54+
# https://github.com/lerebear/sizeup-core/blob/main/README.md#prefix-notation
55+
formula: "- - + additions deletions comments whitespace"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Label PR with size
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- edited
10+
- ready_for_review
11+
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
16+
jobs:
17+
sizeup:
18+
name: Label PR with size
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Run sizeup
23+
uses: lerebear/sizeup-action@b7beb3dd273e36039e16e48e7bc690c189e61951 # 0.8.12
24+
with:
25+
token: "${{ secrets.GITHUB_TOKEN }}"
26+
configuration-file-path: ".github/sizeup.yml"

0 commit comments

Comments
 (0)