forked from CodelyTV/pr-size-labeler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
82 lines (82 loc) · 2.5 KB
/
action.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
name: 'Pull Request size labeler'
description: 'Label a PR based on the amount of changes'
inputs:
GITHUB_TOKEN:
description: 'GitHub token'
required: true
xs_label:
description: 'Label for xs PR'
required: false
default: 'size/xs'
xs_max_size:
description: 'Max size for a PR to be considered xs'
required: false
default: '10'
s_label:
description: 'Label for s PR'
required: false
default: 'size/s'
s_max_size:
description: 'Max size for a PR to be considered s'
required: false
default: '100'
m_label:
description: 'Label for m PR'
required: false
default: 'size/m'
m_max_size:
description: 'Max size for a PR to be considered m'
required: false
default: '500'
l_label:
description: 'Label for l PR'
required: false
default: 'size/l'
l_max_size:
description: 'Max size for a PR to be considered l'
required: false
default: '1000'
xl_label:
description: 'Label for xl PR'
required: false
default: 'size/xl'
fail_if_xl:
description: 'Report GitHub Workflow failure if the PR size is xl allowing to forbid PR merge'
required: false
default: 'false'
message_if_xl:
description: 'Message to show if the PR size is xl'
required: false
default: >
This PR exceeds the recommended size of 1000 lines.
Please make sure you are NOT addressing multiple issues with one PR.
Note this PR might be rejected due to its size.
github_api_url:
description: 'URL to the API of your Github Server, only necessary for Github Enterprise customers'
required: false
default: 'https://api.github.com'
files_to_ignore:
description: 'Whitespace separated list of files to ignore when calculating the PR size (sum of changes)'
required: false
default: ''
runs:
using: 'docker'
image: 'Dockerfile'
args:
- --github_token=${{ inputs.GITHUB_TOKEN }}
- --github_api_url=${{ inputs.github_api_url }}
- --xs_label=${{ inputs.xs_label }}
- --xs_max_size=${{ inputs.xs_max_size }}
- --s_label=${{ inputs.s_label }}
- --s_max_size=${{ inputs.s_max_size }}
- --m_label=${{ inputs.m_label }}
- --m_max_size=${{ inputs.m_max_size }}
- --l_label=${{ inputs.l_label }}
- --l_max_size=${{ inputs.l_max_size }}
- --xl_label=${{ inputs.xl_label }}
- --fail_if_xl=${{ inputs.fail_if_xl }}
- --message_if_xl="${{ inputs.message_if_xl }}"
- --files_to_ignore=${{ inputs.files_to_ignore }}
branding:
icon: 'tag'
color: 'green'