Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pull Request size labeler

Actions
Label a PR based on the amount of changes
v1.10.3
Latest
Star (366)

Codely logo

🏷 Pull Request Size Labeler

codely.tvCodelyTV CoursesGitHub Action version

Visualize and optionally limit the size of your Pull Requests

🚀 Usage

Create a file namedlabeler.yml inside the.github/workflows directory and paste the following configuration.

Note

Take into account that PR Size Labeler considers any line addition, deletion, or modification as a change by default, but you can configure it withoptional arguments such asfiles_to_ignore,ignore_file_deletions, or evenignore_line_deletions.

name:labeleron:[pull_request]jobs:labeler:permissions:pull-requests:writecontents:readissues:writeruns-on:ubuntu-latestname:Label the PR sizesteps:      -uses:codelytv/pr-size-labeler@v1with:xs_label:'size/xs'xs_max_size:'10's_label:'size/s's_max_size:'100'm_label:'size/m'm_max_size:'500'l_label:'size/l'l_max_size:'1000'xl_label:'size/xl'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:'https://api.github.com'files_to_ignore:''

Tip

Replaceon: [pull_request] withon: [pull_request_target] when using forks and when you don't want any PR to be able to execute code (more info: GitHub docs).

🎛️ Arguments

NameRequiredDefault ValueDescription
GITHUB_TOKENNoAutomatically suppliedGitHub token needed to interact with the repository.
xs_labelNo'size/xs'Label for very small-sized PRs.
xs_max_sizeNo'10'Maximum number of changes allowed for XS-sized PRs.
s_labelNo'size/s'Label for small-sized PRs.
s_max_sizeNo'100'Maximum number of changes allowed for S-sized PRs.
m_labelNo'size/m'Label for medium-sized PRs.
m_max_sizeNo'500'Maximum number of changes allowed for M-sized PRs.
l_labelNo'size/l'Label for large-sized PRs.
l_max_sizeNo'1000'Maximum number of changes allowed for L-sized PRs.
xl_labelNo'size/xl'Label for extra-large-sized PRs. A PR will be labeled as 'xl' if it exceeds the amount of changes defined inl_max_size
fail_if_xlNo'false'Whether to fail the GitHub workflow if the PR size is 'XL' (blocks the merge).
message_if_xlNoCustom messageMessage to display when a PR exceeds the 'XL' size limit.
github_api_urlNo'https://api.github.com'URL for the GitHub API, can be changed for GitHub Enterprise Servers.
files_to_ignoreNo''Files to ignore during PR size calculation. Supports newline or whitespace delimited list.
ignore_line_deletionsNo'false'Whether to ignore lines which are deleted when calculating the PR size. If set to 'true', deleted lines will be ignored.
ignore_file_deletionsNo'false'Whether to ignore completely deleted files when calculating the PR size. If set to 'true', deleted files will be ignored. Distinct fromignore_line_deletions in that it only ignores files which are deleted completely. Ifignore_line_deletions is used then usingignore_file_deletions is redundant.

Example forfiles_to_ignore

files_to_ignore:'package-lock.json *.lock'# ORfiles_to_ignore:|  "package-lock.json"  "*.lock"  "docs/*"

Contributing

If you would like to help improve the project, please read thecontribution guidelines.

⚖️ License

MIT

Pull Request size labeler is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Label a PR based on the amount of changes
v1.10.3
Latest

Pull Request size labeler is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.


[8]ページ先頭

©2009-2025 Movatter.jp