Skip to content

Commit 08227d1

Browse files
authored
Format arguments in README as a table (#72)
Small tweak Remove whitespace
1 parent 4bd28fb commit 08227d1

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

README.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</p>
66

77
<h1 align="center">
8-
🏷 Pull Request size labeler
8+
🏷 Pull Request Size Labeler
99
</h1>
1010

1111
<p align="center">
@@ -20,9 +20,7 @@
2020

2121
## 🚀 Usage
2222

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:
2624

2725
```yml
2826
name: labeler
@@ -55,15 +53,26 @@ jobs:
5553
files_to_ignore: ''
5654
```
5755
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. |
5974

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`:
6776
```yml
6877
files_to_ignore: 'package-lock.json *.lock'
6978
# OR
@@ -72,10 +81,11 @@ files_to_ignore: |
7281
"*.lock"
7382
"docs/*"
7483
```
84+
7585
## 🤔 Basic concepts or assumptions
7686

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`.
7989

8090
## ⚖️ License
8191

0 commit comments

Comments
 (0)