Trim whitespace from pending publisher project names - #20609
Open
YS-OH-CORE wants to merge 1 commit into
Open
YS-OH-CORE wants to merge 1 commit into
YS-OH-CORE wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Strip surrounding whitespace from
project_namebefore validating pendingTrusted Publisher forms, matching the existing workflow filename filter. A
pasted name such as
example-nameis accepted asexample-namefor all fourproviders. Blank or internally spaced names are still rejected, and existing,
prohibited, similar, and standard-library project-name checks remain in place.
Fixes #20587.
The regressions exercise the real project-name service and PostgreSQL database,
including owner-only links for existing projects. Account publisher-management tests also
verify that each provider stores the trimmed name and uses it in the success
message and event. The translation catalog changes only update source locations.
Validation on Ubuntu 24.04 WSL2, Python 3.14.7, PostgreSQL 16.15, with the
repository's pinned test dependencies:
failures, 20 passing controls, no errors.
241 passed.
coverage. Ruff, ast-grep, and scoped mypy checks passed.
PostgreSQL 17.5 / the upstream Docker environment and the complete Warehouse
suite were not run. External account lookups are mocked; no live PyPI account
or publisher was changed.
Prepared with OpenAI Codex assistance for Youngseok Oh.