Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/pr-labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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'