-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(op-554): add information to README (#19)
- Loading branch information
1 parent
f7f13f0
commit d6481cf
Showing
4 changed files
with
66 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,65 @@ | ||
# pr-labeler | ||
<br /> | ||
<p align="center"> | ||
<a href="https://www.coverwallet.com/"> | ||
<img src="images/logo.png" alt="Logo" width="400" height="100"> | ||
</a> | ||
|
||
<h3 align="center">pr-labeler</h3> | ||
|
||
<p align="center"> | ||
Add label to the pull request depending on the number of changes and the files excluded from the counting | ||
</p> | ||
</p> | ||
|
||
## Table of Contents | ||
|
||
* [Usage](#usage) | ||
* [Inputs](#inputs) | ||
* [Assumptions](#assumptions) | ||
* [License](#license) | ||
|
||
## Usage | ||
|
||
You can create a `.github/workflows/pr-labeler.yml` file: | ||
|
||
```yaml | ||
name: pr-labeler | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
pr-labeler: | ||
runs-on: ubuntu-latest | ||
name: Label the PR size | ||
steps: | ||
- uses: coverwallet/[email protected] | ||
with: | ||
xs_max_size: '10' | ||
s_max_size: '100' | ||
m_max_size: '500' | ||
l_max_size: '1000' | ||
exclude_files: '.txt' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
``` | ||
|
||
## Inputs | ||
|
||
|
||
| Name | Description | Required | | ||
|------|-------------|----------| | ||
| xs_max_size | The maximum number of lines changed for the label named xs | true | | ||
| s_max_size | The maximum number of lines changed for the label named s | true | | ||
| m_max_size | The maximum number of lines changed for the label named m | true | | ||
| l_max_size | The maximum number of lines changed for the label named l | true | | ||
| exclude_files | The regular expression of the type of file or files that we want to exclude from the counting of changes | true | | ||
|
||
## Assumptions | ||
|
||
- PR size labeler consider as a change any kind of line addition, deletion, or modification | ||
- A PR will be labeled as `xl` if it exceeds the amount of changes defined as `l_max_size` | ||
|
||
## License | ||
|
||
[MIT](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.