5
5
</p >
6
6
7
7
<h1 align =" center " >
8
- 🏷 Pull Request size labeler
8
+ 🏷 Pull Request Size Labeler
9
9
</h1 >
10
10
11
11
<p align =" center " >
20
20
21
21
## 🚀 Usage
22
22
23
- Create a file named ` labeler.yml ` inside the ` .github/workflows ` directory and paste the following configuration.
24
-
25
- ☝️ Here you can see the default values of all available configuration parameters, however, the only required parameter is the ` GITHUB_TOKEN ` one.
23
+ Create a file named ` labeler.yml ` inside the ` .github/workflows ` directory and paste the following configuration:
26
24
27
25
``` yml
28
26
name : labeler
@@ -55,15 +53,26 @@ jobs:
55
53
files_to_ignore : ' '
56
54
` ` `
57
55
58
- ## 🎛️ Available parameters
56
+ ## 🎛️ Arguments
57
+
58
+ | Name | Required | Default Value | Description |
59
+ |-------------------|----------|----------------------|-------------------------------------------------------------------------------------------------------------------------|
60
+ | ` GITHUB_TOKEN` | Yes | Automatically supplied| GitHub token needed to interact with the repository. |
61
+ | `xs_label` | No | 'size/xs' | Label for very small-sized PRs. |
62
+ | `xs_max_size` | No | '10' | Maximum number of changes allowed for XS-sized PRs. |
63
+ | `s_label` | No | 'size/s' | Label for small-sized PRs. |
64
+ | `s_max_size` | No | '100' | Maximum number of changes allowed for S-sized PRs. |
65
+ | `m_label` | No | 'size/m' | Label for medium-sized PRs. |
66
+ | `m_max_size` | No | '500' | Maximum number of changes allowed for M-sized PRs. |
67
+ | `l_label` | No | 'size/l' | Label for large-sized PRs. |
68
+ | `l_max_size` | No | '1000' | Maximum number of changes allowed for L-sized PRs. |
69
+ | `xl_label` | No | 'size/xl' | Label for extra-large-sized PRs. |
70
+ | `fail_if_xl` | No | 'false' | Whether to fail the GitHub workflow if the PR size is 'XL' (blocks the merge). |
71
+ | `message_if_xl` | No | Custom message | Message to display when a PR exceeds the 'XL' size limit. |
72
+ | `github_api_url` | No | 'https://api.github.com' | URL for the GitHub API, can be changed for GitHub Enterprise Servers. |
73
+ | `files_to_ignore` | No | '' | Files to ignore during PR size calculation. Supports newline or whitespace delimited list. |
59
74
60
- - ` *_label` (`xs_label`, `s_label`…): Adjust size label names
61
- - `*_max_size` (`xs_max_size`, `s_max_size`…) : Adjust which amount of changes you consider appropriate for each size based on your project context
62
- - `fail_if_xl` : Set to `'true'` will report GitHub Workflow failure if the PR size is xl allowing to forbid PR merge
63
- - `message_if_xl` : Let the user(s) know that the PR exceeds the recommended size and what the consequences are
64
- - `github_api_url` : Override this parameter in order to use with your own GitHub Enterprise Server. Example: `'https://github.example.com/api/v3'`
65
- - `files_to_ignore` : Whitespace or newline separated list of files to ignore when calculating the PR size, regex match is supported.
66
- # ## files_to_ignore Example:
75
+ # ## Example for `files_to_ignore`:
67
76
` ` ` yml
68
77
files_to_ignore: 'package-lock.json *.lock'
69
78
# OR
@@ -72,10 +81,11 @@ files_to_ignore: |
72
81
"*.lock"
73
82
"docs/*"
74
83
` ` `
84
+
75
85
# # 🤔 Basic concepts or assumptions
76
86
77
- - PR size labeler consider as a change any kind of line addition, deletion, or modification
78
- - A PR will be labeled as `xl` if it exceeds the amount of changes defined as `l_max_size`
87
+ - PR Size Labeler considers any line addition, deletion, or modification as a change.
88
+ - A PR will be labeled as 'xl' if it exceeds the amount of changes defined in `l_max_size`.
79
89
80
90
# # ⚖️ License
81
91
0 commit comments