Skip to content

Commit fa13944

Browse files
committed
Add labels workflow
1 parent aa5d0aa commit fa13944

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

.github/labels.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Warning
2+
- color: "ee0701"
3+
description: "Categorize bug reports."
4+
name: ":warning: bug"
5+
- color: "ee0701"
6+
description: "Categorize vulnerability reports."
7+
name: ":warning: vulnerability"
8+
9+
# Highlight
10+
- color: "0e8a16"
11+
description: "Good for newcomers."
12+
name: ":fire: good first issue"
13+
- color: "0e8a16"
14+
description: "Extra attention is needed."
15+
name: ":fire: help wanted"
16+
17+
# Cancel
18+
- color: "b60205"
19+
description: "This issue or pull request already exists."
20+
name: ":pray: duplicate"
21+
- color: "b60205"
22+
description: "This will not be worked on."
23+
name: ":pray: wontfix"
24+
25+
# Size
26+
- color: "cfd3d7"
27+
description: "Extra Small size issue or PR."
28+
name: "size/XS"
29+
- color: "cfd3d7"
30+
description: "Small size issue or PR."
31+
name: "size/S"
32+
- color: "cfd3d7"
33+
description: "Medium size issue or PR."
34+
name: "size/M"
35+
- color: "cfd3d7"
36+
description: "Large size issue or PR."
37+
name: "size/L"
38+
- color: "cfd3d7"
39+
description: "Extra Large size issue or PR."
40+
name: "size/XL"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Label Pull Requests
2+
3+
on:
4+
- pull_request
5+
6+
jobs:
7+
label-pr:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Add PR Size Labels for PR
12+
uses: codelytv/pr-size-labeler@v1
13+
with:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
xs_label: 'size/XS'
16+
xs_max_size: '20'
17+
s_label: 'size/S'
18+
s_max_size: '50'
19+
m_label: 'size/M'
20+
m_max_size: '150'
21+
l_label: 'size/L'
22+
l_max_size: '300'
23+
xl_label: 'size/XL'
24+
fail_if_xl: 'false'
25+
message_if_xl: >
26+
'This PR has too many changes.
27+
Please make sure you are NOT addressing multiple issues with one PR.'

.github/workflows/sync-labels.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Sync labels
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- .github/labels.yaml
9+
10+
jobs:
11+
sync-labels:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
18+
- name: Sync labels
19+
uses: crazy-max/ghaction-github-labeler@v3
20+
with:
21+
github-token: ${{ secrets.GITHUB_TOKEN }}
22+
yaml-file: .github/labels.yaml
23+
skip-delete: false
24+
dry-run: false
25+
# exclude: |

0 commit comments

Comments
 (0)