Label pull request 7203 by mhucka #1
Workflow file for this run
This file contains hidden or 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
# Copyright 2025 The Cirq Developers | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
# Label PRs with labels such as size. | |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
name: Pull request labeler | |
run-name: >- | |
Label pull request ${{github.event.pull_request.number}} by ${{github.actor}} | |
on: | |
pull_request: | |
types: [opened] | |
# Allow manual invocation. | |
workflow_dispatch: | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
label-pr-size: | |
name: Add size label to new pull request | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
pull-requests: write | |
issues: write | |
steps: | |
- name: Label the PR with a size label | |
uses: codelytv/pr-size-labeler@c7a55a022747628b50f3eb5bf863b9e796b8f274 # v1 | |
with: | |
# Don't count file deletions, per suggestion in Small CLs. | |
ignore_file_deletions: 'true' | |
xs_label: 'Size: XS' | |
xs_max_size: '10' | |
s_label: 'size: S' | |
s_max_size: '50' | |
m_label: 'size: M' | |
m_max_size: '250' | |
l_label: 'size: L' | |
l_max_size: '1000' | |
xl_label: 'size: XL' | |
fail_if_xl: 'false' | |
message_if_xl: >- | |
The size of this pull request exceeds 1000 additions and/or | |
deletions. Extra large pull requests like this are more difficult | |
to review, and sometimes their large size signals that they could | |
be restructured. Please check the following: | |
- [ ] Are the git commits in this PR limited to what's needed? Or | |
is it possible that other commits were included accidentally? | |
- [ ] Does this PR only address one issue, feature, problem, or | |
topic? Or are multiple issues or changes mixed together? | |
Sometimes large commits really are needed, and that's okay! | |
Examples include reformatting code using an automated tool, | |
refactoring code, and adding generated code. At other times, a | |
large PR could benefit by reconsidering it in light of the [Small | |
CLs](https://google.github.io/eng-practices/review/developer/small-cls.html) | |
principles. |