Skip to content

feat: ✨ add validator for package_github_repo #93

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

Merged
merged 1 commit into from
Jul 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion copier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ _subdirectory: template
# Questions:
package_github_repo:
type: str
help: "What is the GitHub repository spec for the package (in the form of 'user/repo'))?"
help: "What is the GitHub repository spec for the package?"
placeholder: "user/repo"
validator: |
{% if package_github_repo and not (package_github_repo | regex_search('^[\w.-]+\/[\w.-]+$')) %}
Must be in the format `user/repo` and contain only alphanumeric characters and `_`, `-`, or `.`.
{% endif %}

author_given_name:
type: str
Expand Down
Loading