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

Fix: Patch regex pattern for Github validation #54

Merged
merged 2 commits into from
Feb 5, 2024
Merged

Conversation

notsatan
Copy link
Owner

@notsatan notsatan commented Feb 5, 2024

Description

Apparently, the regex pattern being used to validate if a module-path was a Github repository did not allow for underscores in the user/repository name

# Regex pattern to validate module name - might need some tweaks
pattern = r"^github.com\/[a-zA-Z0-9\-]+\/[a-zA-Z0-9\-]+\/?$"

This PR closes #53

Type of Change

  • 📚 Documentation (Non-breaking change; Changes in the documentation)
  • 🔧 Bug fix (Non-breaking change; Fixes an existing bug)
  • 🥂 Improvement (Non-breaking change; Improves existing feature)
  • 🚀 New feature (Non-breaking change; Adds functionality)
  • 🔐 Security fix (Non-breaking change; Patches a security issue)
  • 💥 Breaking change (Breaks existing functionality)

Review Process

Reviewees:

  1. Prefer incremental and appropriately-scoped changes.
  2. Leave a comment on things you want explicit feedback on.
  3. Respond clearly to comments and questions.

Reviewers:

  1. Test functionality using the criteria above.
  2. Offer tips for efficiency, feedback on best practices, and possible alternative approaches.
  3. For shorter, "quick" PRs, use your best judgment on the previous point.
  4. Use a collaborative approach and provide resources and/or context where appropriate.
  5. Provide screenshots/grabs where appropriate to show findings during review.
  6. In case of a potential bug in PR, be sure to add steps to reproduce the issue (where applicable)

The previous regex pattern being used did not allow for underscores
in the names of users/repositories — even when they are allowed on
Github

Took this chance to simplify the regex pattern a bit. Fixes #53

Signed-off-by: notsatan <[email protected]>
@notsatan notsatan added the fix Fixes a bug label Feb 5, 2024
@notsatan notsatan self-assigned this Feb 5, 2024
@notsatan notsatan merged commit 168aa85 into master Feb 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ran into exception while running validator: is_module_hosted_on_github
1 participant