mirror of
https://github.com/CodelyTV/pr-size-labeler.git
synced 2025-02-18 19:12:50 -05:00
🏷 Visualize and optionally limit the size of your Pull Requests
actionautomationcodelycodelytvgithubgithub-actiongithub-actionspull-requestpull-request-actionpull-request-managementpull-requests
- New value based on what an AWS team suggest: https://github.com/awslabs/fhir-works-on-aws-authz-rbac/pull/24 |
||
---|---|---|
.github/workflows | ||
src | ||
action.yml | ||
Dockerfile | ||
entrypoint.sh | ||
LICENSE | ||
README.md |
🏷 Pull Request size labeler
Visualize and optionally limit the size of your Pull Requests
🚀 Usage
Create a file named labeler.yml
inside the .github/workflows
directory and paste:
name: labeler
on: [pull_request]
jobs:
labeler:
runs-on: ubuntu-latest
name: Label the PR size
steps:
- uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_max_size: '10'
s_max_size: '100'
m_max_size: '500'
l_max_size: '1000'
fail_if_xl: 'false'
message_if_xl: >
'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: 'api.github.com'
If you want, you can customize all
*_max_size
with the size that fits in your project.
Setting
fail_if_xl
to'true'
will make fail all pull requests bigger thanl_max_size
.
Github Enterprise Server
You can override the public Github API by setting github_api_url
.
- uses: codelytv/pr-size-labeler@v1
with:
...
github_api_url: 'github.mycompany.net/api/v3'