Skip to content

CI Tweak autoclose script to add more debug info - #32745

Merged
lesteve merged 4 commits into
scikit-learn:mainfrom
lesteve:tweak-autoclose
Nov 24, 2025
Merged

lesteve merged 4 commits into
scikit-learn:mainfrom
lesteve:tweak-autoclose

Conversation

@lesteve

@lesteve lesteve commented Nov 19, 2025 •

Copy link
Copy Markdown
Member

Main changes:

  • more debug info to print opened PRs with autoclose label and then the number of PRs to close. This would allow to monitor the action before it can close its first PR Test PR for autoclosing mechanism #32743
  • add dry_run variable to be able to set it to False and run the script locally without worrying about closing PRs
  • use timedelta rather than difference of days
  • more minor stuff

cc @StefanieSenger

Here is the output if I run it locally:

❯ python build_tools/github/autoclose_prs.py
Found 1 opened PRs with label autoclose
['Test autoclose in PR: '
 'https://github.com/scikit-learn/scikit-learn/pull/32743']
Found 0 PRs to autoclose
[]

@github-actions

github-actions Bot commented Nov 19, 2025 •

Copy link
Copy Markdown

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 922c992. Link to the linter CI: here

@lucyleeow lucyleeow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@lesteve

lesteve commented Nov 20, 2025

Copy link
Copy Markdown
Member Author

I push a tiny change to avoid a DeprecationWarning that I saw in the autoclose workflow than ran successfully this morning build log

/home/runner/work/scikit-learn/scikit-learn/build_tools/github/autoclose_prs.py:25: DeprecationWarning: Argument login_or_token is deprecated, please use auth=github.Auth.Token(...) instead
  gh = Github(github_token)

@github-actions github-actions Bot added the CI:Linter failure The linter CI is failing on this PR label Nov 24, 2025
This reverts commit c8871ea.
@github-actions github-actions Bot removed the CI:Linter failure The linter CI is failing on this PR label Nov 24, 2025
@lesteve

lesteve commented Nov 24, 2025

Copy link
Copy Markdown
Member Author

Merging my own PR with one approval 😉

@lesteve
lesteve merged commit cd3a2f6 into scikit-learn:main Nov 24, 2025
@lesteve
lesteve deleted the tweak-autoclose branch November 24, 2025 07:55
@StefanieSenger

Copy link
Copy Markdown
Member

It was on my ToDo list, but I wasn't fast enough to get here. 😅

@lesteve

lesteve commented Nov 24, 2025

Copy link
Copy Markdown
Member Author

It was on my ToDo list, but I wasn't fast enough to get here. 😅

I guessed so, no worries ... I am reasonably confident that it should work and more than happy to discuss about the changes if you have suggestions!

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.

3 participants