Skip to content

Commit a0cfd49

Browse files
JavierCanejohnlk
authored andcommitted
docs: unify the "Basic concepts or assumptions" readme section into the most related arguments to make it easier to read
Improve the existing contribution guide (#74) * Improve the existing contribution guide * reorder the contribution steps to push testing up Co-authored-by: Javier Ferrer González <[email protected]> * tweak contribution process opener copy Co-authored-by: Javier Ferrer González <[email protected]> --------- Co-authored-by: Javier Ferrer González <[email protected]> Put back accidental deletion
1 parent 1dbadc5 commit a0cfd49

File tree

1 file changed

+22
-25
lines changed

1 file changed

+22
-25
lines changed

README.md

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@
2020

2121
## 🚀 Usage
2222

23-
Create a file named `labeler.yml` inside the `.github/workflows` directory and paste the following configuration:
23+
Create a file named `labeler.yml` inside the `.github/workflows` directory and paste the following configuration.
24+
25+
> [!NOTE]
26+
> Take into account that PR Size Labeler considers any line addition, deletion, or modification as a change by default, but you can configure it with [optional arguments](https://github.com/CodelyTV/pr-size-labeler?tab=readme-ov-file#%EF%B8%8F-arguments) such as `files_to_ignore`, `ignore_file_deletions`, or even `ignore_line_deletions`.
2427
2528
```yml
2629
name: labeler
@@ -55,24 +58,24 @@ jobs:
5558
5659
## 🎛️ Arguments
5760
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. |
74-
| `ignore_line_deletions` | No | 'false' | Whether to ignore lines which are deleted when calculating the PR size. If set to 'true', deleted lines will be ignored. |
75-
| `ignore_file_deletions` | No | 'false' | Whether to ignore completely deleted files when calculating the PR size. If set to 'true', deleted files will be ignored. |
61+
| Name | Required | Default Value | Description |
62+
|-------------------------|----------|----------------------|---------------------------------------------------------------------------------------------------------------------------|
63+
| `GITHUB_TOKEN` | Yes | Automatically supplied| GitHub token needed to interact with the repository. |
64+
| `xs_label` | No | 'size/xs' | Label for very small-sized PRs. |
65+
| `xs_max_size` | No | '10' | Maximum number of changes allowed for XS-sized PRs. |
66+
| `s_label` | No | 'size/s' | Label for small-sized PRs. |
67+
| `s_max_size` | No | '100' | Maximum number of changes allowed for S-sized PRs. |
68+
| `m_label` | No | 'size/m' | Label for medium-sized PRs. |
69+
| `m_max_size` | No | '500' | Maximum number of changes allowed for M-sized PRs. |
70+
| `l_label` | No | 'size/l' | Label for large-sized PRs. |
71+
| `l_max_size` | No | '1000' | Maximum number of changes allowed for L-sized PRs. |
72+
| `xl_label` | No | 'size/xl' | Label for extra-large-sized PRs. A PR will be labeled as 'xl' if it exceeds the amount of changes defined in `l_max_size` |
73+
| `fail_if_xl` | No | 'false' | Whether to fail the GitHub workflow if the PR size is 'XL' (blocks the merge). |
74+
| `message_if_xl` | No | Custom message | Message to display when a PR exceeds the 'XL' size limit. |
75+
| `github_api_url` | No | 'https://api.github.com' | URL for the GitHub API, can be changed for GitHub Enterprise Servers. |
76+
| `files_to_ignore` | No | '' | Files to ignore during PR size calculation. Supports newline or whitespace delimited list. |
77+
| `ignore_line_deletions` | No | 'false' | Whether to ignore lines which are deleted when calculating the PR size. If set to 'true', deleted lines will be ignored. |
78+
| `ignore_file_deletions` | No | 'false' | Whether to ignore completely deleted files when calculating the PR size. If set to 'true', deleted files will be ignored. Distinct from `ignore_line_deletions` in that it only ignores files which are deleted completely. If `ignore_line_deletions` is used then using `ignore_file_deletions` is redundant. |
7679

7780
### Example for `files_to_ignore`:
7881
```yml
@@ -84,12 +87,6 @@ files_to_ignore: |
8487
"docs/*"
8588
```
8689

87-
## 🤔 Basic concepts or assumptions
88-
89-
- PR Size Labeler considers any line addition, deletion, or modification as a change.
90-
- A PR will be labeled as 'xl' if it exceeds the amount of changes defined in `l_max_size`.
91-
- `ignore_file_deletions` is distinct from `ignore_line_deletions` in that it only ignores files which are deleted completely. If `ignore_line_deletions` is used then using `ignore_file_deletions` is redundant.
92-
9390
## Contributing
9491
If you would like to help improve the project, please read the [contribution guidelines](https://github.com/CodelyTV/pr-size-labeler/blob/main/.github/CONTRIBUTIONS.md).
9592

0 commit comments

Comments
 (0)