Skip to content

Close stale PRs without signed CLA #30500

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

Merged
merged 6 commits into from
Feb 17, 2022
Merged

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Jan 9, 2022

@erlend-aasland
Copy link
Contributor Author

FYI, we're "speed-testing" this PR over at https://github.com/hugovk/cpython/pulls

@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Jan 10, 2022

@hugovk, based on the first cron run, I suggest the following changes:

  1. Based on the debug output, use only-pr-labels: 'CLA signed' instead of exempt-pr-labels: 'CLA not signed' for the first step. It is probably easier to read as well.
  2. Name each step. Currently both of them confusingly appear as Run actions/stale@v4.

Actually, I found the step with the "exempt rule" confusing to read compared to the step with the "only rule". It seems like the two rules are processed differently as well. For only-pr-labels, the action aborts almost immediately. For exempt-pr-labels it appears to abort much later in the process.

@erlend-aasland
Copy link
Contributor Author

Actually, I found the step with the "exempt rule" confusing to read compared to the step with the "only rule". It seems like the two rules are processed differently as well. For only-pr-labels, the action aborts almost immediately. For exempt-pr-labels it appears to abort much later in the process.

Debug output from the PR which was caught by the exempt-rule
[#17] Pull request #17
[#17] Found this pull request last updated at: 2022-01-09T16:25:57Z
[#17] The option only-labels (​https://github.com/actions/stale#only-labels​) was not specified
[#17] └── Continuing the process for this pull request
[#17] Days before pull request stale: 1
[#17] The pull request is not closed nor locked. Trying to remove the close label...
[#17] ├── The close-pr-label (​https://github.com/actions/stale#close-pr-label​) option was not set
[#17] └── Skipping the removal of the close label
[#17] This pull request hasn't a stale label
[#17] Skipping this pull request because it has an exempt label
Debug output from the PR which was caught by the only-rule
[#18] Pull request #18
[#18] Found this pull request last updated at: 2022-01-09T16:25:48Z
[#18] The option only-labels (​https://github.com/actions/stale#only-labels​) was specified to only process issues and pull requests with all those labels (1)
[#18] └── Skipping this pull request because it doesn't have all the required labels

I prefer the latter.

Erlend Egeberg Aasland and others added 2 commits January 10, 2022 11:24
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@erlend-aasland
Copy link
Contributor Author

@Mariatta, thank you for reviewing! I've added the do-not-merge label until we've tested this change properly on our forks (see the last TODO item). I'll remove that label if everything is all fine after we've finished testing.

@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Jan 11, 2022

@hugovk, the logs look much better with the recent changes applied: https://github.com/hugovk/cpython/runs/4769591131?check_suite_focus=true

@erlend-aasland erlend-aasland removed the request for review from brettcannon January 12, 2022 22:40
@erlend-aasland
Copy link
Contributor Author

I've tested this change on my fork, modified to mark a PR stale after 1 day, and close after 1 day (no CLA). I've verified, as expected, that PRs that are marked stale, and that received comments after being marked stale, will not be closed (cc. @ambv).

For test PR 20, which received comments after being marked stale, the actions bot correctly removed the stale label on the following run. For test PR 21, which did not receive comments after being marked stale, the actions bot closed the PR on the following run.

Here's the PRs:

(Removing the do-not-merge label, @Mariatta.)

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Worked as expected on hugovk#17 and hugovk#18 👍

@erlend-aasland
Copy link
Contributor Author

@ambv Are ok with this PR as it stands?

@ambv
Copy link
Contributor

ambv commented Feb 17, 2022

@erlend-aasland yes, let's land it.

@ambv ambv merged commit 5bc4327 into python:main Feb 17, 2022
@erlend-aasland erlend-aasland deleted the close-stale-non-cla branch February 17, 2022 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants