Skip to content

Conversation

mhucka
Copy link
Contributor

@mhucka mhucka commented Mar 31, 2025

This workflow adds automatic labeling of sizes of PRs. It's configured to use
the same labels we use in Cirq (e.g., size: M, size: L, etc.) and the
behavior should be a close approximation to what CirqBot currently does via
pr_monitor. Once in place, it should then be possible to remove pr_monitor
from the Cirq code base, because its automerge functionality (which is the
other thing that it did) is now done using GitHub's merge queues.

This basically resolves #7000 and #6935.

mhucka and others added 2 commits March 31, 2025 15:16
This size labeling workflow should be a close approximation to what
CirqBot currently does via `pr_monitor`. Once in place, it should be
possible to remove pr_monitor from the Cirq code base, because the
automerge functionality of pr_monitor (which is the other thing that
it did) is now implemented using GitHub's merge queues.

This basically resolves quantumlib#7000.
@mhucka
Copy link
Contributor Author

mhucka commented Mar 31, 2025

Related issue: #6024

@mhucka mhucka self-assigned this Mar 31, 2025
@mhucka mhucka added area/ci area/cirqbot kind/health For CI/testing/release process/refactoring/technical debt items labels Mar 31, 2025
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.14%. Comparing base (75f0dd3) to head (e4c5b24).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7203   +/-   ##
=======================================
  Coverage   98.14%   98.14%           
=======================================
  Files        1100     1100           
  Lines       96244    96244           
=======================================
  Hits        94462    94462           
  Misses       1782     1782           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines 63 to 79
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us take this out, the advice can be spammy for experienced developers.
New contributors are less likely to produce an XL PR. Either of those need to
be human-reviewed and we can ask to split such PRs where it makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us take this out, the advice can be spammy for experienced developers. New contributors are less likely to produce an XL PR. Either of those need to be human-reviewed and we can ask to split such PRs where it makes sense.

Yeah, you're right. Taking it out.

Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after removing the XL message.

@mhucka mhucka marked this pull request as ready for review April 1, 2025 04:32
@mhucka mhucka requested review from vtomole and a team as code owners April 1, 2025 04:32
@mhucka mhucka requested a review from viathor April 1, 2025 04:32
@mhucka mhucka enabled auto-merge April 1, 2025 04:32
Review comments led to the conclusion that the message is unnecessary
and more likely to be annoying than helpfu.
@mhucka mhucka added this pull request to the merge queue Apr 1, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 1, 2025
@mhucka mhucka added this pull request to the merge queue Apr 1, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 1, 2025
@pavoljuhas pavoljuhas added this pull request to the merge queue Apr 1, 2025
Merged via the queue into quantumlib:main with commit efabff1 Apr 1, 2025
38 checks passed
@mhucka mhucka changed the title Resolve issue #7000 by adding PR labeler workflow Resolve issue #7000 by adding PR size-labeling GitHub Actions workflow Apr 8, 2025
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
…ib#7203)

* Add PR labeler workflow with size labeling (for now)

This size labeling workflow should be a close approximation to what
CirqBot currently does via `pr_monitor`. Once in place, it should be
possible to remove pr_monitor from the Cirq code base, because the
automerge functionality of pr_monitor (which is the other thing that
it did) is now implemented using GitHub's merge queues.

This basically resolves quantumlib#7000.

* Remove message for XL changes

Review comments led to the conclusion that the message is unnecessary
and more likely to be annoying than helpfu.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci area/cirqbot kind/health For CI/testing/release process/refactoring/technical debt items
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check CirqBot and update as needed
2 participants