Skip to content

Commit

Permalink
Fix: Patch github validation regex pattern
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
notsatan committed Feb 5, 2024
1 parent e146f9e commit 44267f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks/pre_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def is_module_hosted_on_github():
"""

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

# If the user has not opted for Github-specific features, skip
perform_check: bool = bool(
Expand Down

0 comments on commit 44267f6

Please sign in to comment.