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

Pre-commit: prevent spaces in news entry paths #126063

Merged
merged 3 commits into from
Oct 28, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 28, 2024

Follow on to python/core-workflow#186 and https://discuss.python.org/t/new-blurb-1-2-please-upgrade/59159:

At some future point, we may trigger an error on the CI if a news file is found in a directory with spaces, so please do upgrade your blurb now.

When it fails, it tells you what to do, for example:

Check Core and Builtins news entries.....................................Failed
- hook id: blurb-no-space-core-and-builtins
- exit code: 1

Space found in path, move to Misc/NEWS.d/next/Core_and_Builtins/

Misc/NEWS.d/next/Core and Builtins/2023-12-30-00-21-45.gh-issue-113570._XQgsW.rst
Misc/NEWS.d/next/Core and Builtins/2024-05-12-03-10-36.gh-issue-118950.5Wc4vp.rst
Misc/NEWS.d/next/Core and Builtins/2024-10-18-10-11-43.gh-issue-125593.Q97m3A.rst
Misc/NEWS.d/next/Core and Builtins/2024-10-26-13-32-48.gh-issue-126012.2KalhG.rst

https://github.com/python/cpython/actions/runs/11548867437/job/32140948311?pr=126063

We may get some old PRs merged that don't have the check, but it will be easy to cleanup later. And we often update old PRs from main to re-trigger the CI and see the warning before merge.


Thanks to @adamchainz for https://adamj.eu/tech/2024/01/24/pre-commit-fail-hook/

@hugovk hugovk added the infra CI, GitHub Actions, buildbots, Dependabot, etc. label Oct 28, 2024
@hugovk hugovk requested a review from AlexWaygood as a code owner October 28, 2024 06:54
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Nice, TIL!

@hugovk hugovk merged commit dcda92f into python:main Oct 28, 2024
29 checks passed
@hugovk hugovk deleted the pre-commit-no-spaces-in-news-entry-paths branch October 28, 2024 21:04
zware added a commit that referenced this pull request Nov 20, 2024
Cleanup after GH-126063, including moving the `README.rst` files to the new directories.
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Cleanup after pythonGH-126063, including moving the `README.rst` files to the new directories.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra CI, GitHub Actions, buildbots, Dependabot, etc. skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants