-
Notifications
You must be signed in to change notification settings - Fork 206
Fix #3655: Allow dots (.), hyphens (-), and underscores (_) in GitHub usernames #3658
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
base: dev
Are you sure you want to change the base?
Conversation
Nice, thanks! Could you add a check that we are not working with a github repo and then add a pytest for the whole new functionality? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Hi @mashehu |
Not too sure about the requirements for gitlab, but maybe this would be the simplest solution |
…ip strict check for non-GitHub repos
…o allow-user-names-with-dots
Hi @mashehu, I've implemented the new logic for username validation, including conditional checks to bypass strict regex validation for non-GitHub origins. I’ve also added corresponding unit tests to ensure correctness, and all test cases are passing now. Could you please review the changes when you get a chance? Let me know if any modifications or improvements are needed. |
…in test/modules/test_create.py
Hi @mashehu , just following up on this PR 😊 |
Hi, yes, I will come back to this on Monday. Sorry for the delay, but I am on partial parental leave and we had a release last week that took away a lot of time. |
🔧 What does this PR do?
This PR fixes username validation in the modules create flow. Previously, usernames with dots (e.g., @john.doe) were rejected as invalid, even though they are allowed on platforms like GitLab. This blocked users from using custom module repositories with valid usernames.
🛠️ Changes made:
Updated the GitHub username validation regex in create.py to allow ., -, and _ characters
Error message updated to reflect valid formats
📌 Why is this needed?
To support usernames on platforms other than GitHub (e.g., GitLab), which allow characters like . in usernames. Previously, the validation was too strict and caused confusion and unnecessary errors for users.
🔗 Related Issue
Fixes #3655
PR checklist
CHANGELOG.md
is updateddocs
is updated