fix: allow dots in usernames for non-GitHub git providers#4343
Open
sanmaxdev wants to merge 2 commits into
Open
fix: allow dots in usernames for non-GitHub git providers#4343sanmaxdev wants to merge 2 commits into
sanmaxdev wants to merge 2 commits into
Conversation
The username validation regex was GitHub-specific and rejected usernames containing dots, which are valid on GitLab and other git providers. Updated the regex to accept dots and made the warning message provider-agnostic. Fixes nf-core#3655
Contributor
|
thanks for the fix. Can you please add a test in |
Author
|
Thanks — added the requested regression coverage in Verification:
|
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.
Summary
_get_username()to accept dots (.)GitLab and other git providers allow dots in usernames, but the existing regex only accepted alphanumeric characters and hyphens. This blocked module creation for users with dotted usernames on those platforms.
Changes
nf_core/components/create.py: Modified regex to include.as a valid character in usernamesVerification
ruff format— 1 file already formattedruff check— All checks passed@user,@user.name,@first.last,@user-name.lastfrom nf_core.components.create import ComponentCreatepassesCloses #3655