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

Ask for repo name and offer to create for both type of projects #298

Merged
merged 1 commit into from
Mar 4, 2024
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
35 changes: 18 additions & 17 deletions py_maker/pymaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,23 +314,24 @@ def get_input(self) -> None:
self.choices.package_name = self.get_sanitized_package_name(pk_name)
self.choices.homepage = Prompt.ask("Homepage URL?", default="")

github_username = (
self.settings.github_username
if self.settings.github_username
else "<your GitHub username>"
)
repo_name = (
sanitize(self.choices.project_dir.name)
if self.choices.package_name == "-"
else self.choices.package_name
)
self.choices.repository = Prompt.ask(
"Repository URL?",
default=(
f"https://github.com/{github_username}/"
f"{re.sub(r'[_.]+', '-', repo_name.lower())}"
),
)
# offer to create a repo on GitHub, for both type of projects.
github_username = (
self.settings.github_username
if self.settings.github_username
else "<your GitHub username>"
)
repo_name = (
sanitize(self.choices.project_dir.name)
if self.choices.package_name == "-"
else self.choices.package_name
)
self.choices.repository = Prompt.ask(
"Repository URL?",
default=(
f"https://github.com/{github_username}/"
f"{re.sub(r'[_.]+', '-', repo_name.lower())}"
),
)

self.choices.description = Prompt.ask(
"Description of the Application?",
Expand Down