Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update & improve workflow for stale issues & PRs #7045

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mhucka
Copy link
Contributor

@mhucka mhucka commented Feb 8, 2025

  1. The previous settings were incorrect. The value of stale-issue-label should be status/going-stale; it is the value of close-issue-label that should be status/stale.

  2. Added a couple of labels that would exempt PRs from staleness.

  3. Per discussion on issue Revisit policy of auto-closing issues #6866, the message should be more clear that users can easily reopen the issue or PR by commenting on it.

1. The previous settings were incorrect. The value of
   `stale-issue-label` should be `status/going-stale`; it is the value
   of `close-issue-label` that should be `status/stale`.

2. Added a couple of labels that would exempt PRs from staleness.

3. Per discussion on issue quantumlib#6866, the message should be more clear
   that users can easily reopen the issue or PR by commenting on it.
@CirqBot CirqBot added the size: M 50< lines changed <250 label Feb 8, 2025
Copy link

codecov bot commented Feb 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.17%. Comparing base (16231fc) to head (8fbf9b7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7045      +/-   ##
==========================================
- Coverage   98.17%   98.17%   -0.01%     
==========================================
  Files        1089     1089              
  Lines       95177    95177              
==========================================
- Hits        93438    93436       -2     
- Misses       1739     1741       +2     

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

@mhucka mhucka marked this pull request as ready for review February 8, 2025 02:43
@mhucka mhucka requested review from vtomole and a team as code owners February 8, 2025 02:43
@mhucka mhucka requested a review from senecameeks February 8, 2025 02:43
@mhucka mhucka enabled auto-merge February 8, 2025 02:44
the Cirq project maintainers at [email protected].
This pull request has been closed due to inactivity for 60 days since
the time the `status/stale` label was applied. If you would like to
restore its active status, please leave a comment here; doing so will
Copy link
Collaborator

Choose a reason for hiding this comment

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

here and in close-issue-message

Suggested change
restore its active status, please leave a comment here; doing so will
continue working on this PR, feel free to reopen it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catches! Thanks.

@pavoljuhas
Copy link
Collaborator

  1. The previous settings were incorrect. The value of stale-issue-label should be status/going-stale; it is the value of close-issue-label that should be status/stale.

Is it a requirement to have different labels for stale-issue-label vs close-issue-label.
Personally, I found it 50% easier to understand one label status/stale instead of two. :-)
In my reading, issues become stale after 90 days and we close stale issues after additional days-before-close days.
The close-something-message makes it clear the thing was closed by the bot due to staleness, I see no need for an extra label.

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.

If possible, I'd rather stick to one label status/stale. Otherwise LGTM.

This makes corrections to the "close" messages per
[review comments by @NoureldinYosri](quantumlib#7045 (comment)).
To avoid writing actual duration values in multiple places (and thus
face the risk of not updating some of them if we decide to change
values in the future), this now uses environment variables to store
the important values.

This also provides an easier way of writing the lists of exempt
labels. The stale handler action needs them as a comma-separated
string, and this is a bit of a PITA to edit when we make changes. We
can make it easier on ourselves in the future by using a list format
instead.
Per [discussion in
review](quantumlib#7045 (comment)),
we decided we don't need separate labels `status/going-stale` and
`status/stale`. When an issue or PR is closed due to staleness, the
comment left by the workflow will make it clear why it was closed. We
can simplify things by using a single label.
@mhucka
Copy link
Contributor Author

mhucka commented Feb 25, 2025

Is it a requirement to have different labels for stale-issue-label vs close-issue-label?

Not a requirement, no. I think I only followed the existing convention in Cirq; the going-stale label has been around since 2019, and while the number of issues showing that label is small, that may be misleading because IIRC the workflow would remove the going-stale label when it applies the status/stale label.

Anyway, I like the simplification, and in any case, would defer to your experiences. I'll go ahead and update stale.yml to use one label.

If we are doing this, perhaps we should also get rid of triage/stale? It seems like status/stale could be used instead there too.

mhucka and others added 3 commits February 24, 2025 20:50
@mhucka mhucka self-assigned this Feb 25, 2025
@mhucka mhucka added the kind/health For CI/testing/release process/refactoring/technical debt items label Feb 25, 2025
@mhucka mhucka changed the title Fix labels & update messages Update & improve workflow for stale issues & PRs Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/health For CI/testing/release process/refactoring/technical debt items size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants