-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Renaming github_user to github_owner + generating repo_name and repo_url
- Loading branch information
1 parent
a299d9d
commit ebf2649
Showing
8 changed files
with
27 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ def main(initialise_git_repository: str, deploy_docs_to_github_pages: str) -> in | |
print( | ||
"GitHub CLI detected, you can create a repo with the following:\n\n" | ||
"gh repo create " | ||
"{{cookiecutter.github_username}}/{{cookiecutter.project_slug}} " | ||
"{{cookiecutter.__repo_name}} " | ||
"-d '{{cookiecutter.project_short_description}}' " | ||
"--public " | ||
"-r origin " | ||
|
@@ -73,12 +73,12 @@ def main(initialise_git_repository: str, deploy_docs_to_github_pages: str) -> in | |
print( | ||
"You now have a local git repository. To sync this to GitHub " | ||
"you need to create an empty GitHub repo with the name " | ||
"{{cookiecutter.github_username}}/{{cookiecutter.project_slug}} " | ||
"{{cookiecutter.__repo_name}} " | ||
"- DO NOT SELECT ANY OTHER OPTION.\n\nSee this link for more detail " | ||
"https://docs.github.com/en/get-started/quickstart/create-a-repo.\n\n" | ||
"Then run:\n\n" | ||
"git remote add origin [email protected]:" | ||
"{{cookiecutter.github_username}}/{{cookiecutter.project_slug}}.git\n" | ||
"{{cookiecutter.__repo_name}}.git\n" | ||
) | ||
except subprocess.CalledProcessError as e: | ||
# some other error | ||
|
@@ -91,13 +91,11 @@ def main(initialise_git_repository: str, deploy_docs_to_github_pages: str) -> in | |
"deploying as a GitHub Pages website. To allow the GitHub Actions bot to " | ||
"push to the gh-pages branch you need to enable 'Read and write " | ||
"permissions' under 'Workflow permissions' at\n\n" | ||
"https://github.com/{{cookiecutter.github_username}}/" | ||
"{{cookiecutter.project_slug}}/settings/actions\n\n" | ||
"{{cookiecutter.__repo_url}}/settings/actions\n\n" | ||
"After the 'Documentation' workflow has successfully completed at least " | ||
"once you will also need to configure the repository to deploy a GitHub " | ||
"pages site from the content on the gh-pages branch by going to\n\n" | ||
"https://github.com/{{cookiecutter.github_username}}/" | ||
"{{cookiecutter.project_slug}}/settings/pages\n\n" | ||
"{{cookiecutter.__repo_url}}/settings/pages\n\n" | ||
"and under 'Built and deployment' selecting 'Deploy from a branch' for " | ||
"the 'Source' drop-down and 'gh-pages' for the 'Branch' drop-down, " | ||
"leaving the branch path drop-down with its default value of '/ (root)'." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ def test_initialisation_of_git_repo( | |
"--no-input", | ||
"--output-dir", | ||
f"{tmp_path}", | ||
f"github_username={project_config['github_username']}", | ||
f"github_owner={project_config['github_owner']}", | ||
f"project_name={project_config['project_name']}", | ||
f"project_short_description={project_config['project_short_description']}", | ||
git_init_cookiecutter_option, | ||
|
@@ -75,7 +75,7 @@ def test_initialisation_of_git_repo( | |
) | ||
assert ( | ||
"GitHub CLI detected, you can create a repo with the following:\n\n" | ||
f"gh repo create {project_config['github_username']}/" | ||
f"gh repo create {project_config['github_owner']}/" | ||
f"{project_config['expected_repo_name']} -d " | ||
f"'{project_config['project_short_description']}' --public -r " | ||
f"origin --source {project_config['expected_repo_name']}" | ||
|
@@ -88,12 +88,12 @@ def test_initialisation_of_git_repo( | |
assert ( | ||
"You now have a local git repository. To sync this to GitHub you " | ||
"need to create an empty GitHub repo with the name " | ||
f"{project_config['github_username']}/" | ||
f"{project_config['github_owner']}/" | ||
f"{project_config['expected_repo_name']} - DO NOT SELECT ANY " | ||
"OTHER OPTION.\n\nSee this link for more detail " | ||
"https://docs.github.com/en/get-started/quickstart/create-a-repo" | ||
".\n\nThen run:\n\ngit remote add origin [email protected]:" | ||
f"{project_config['github_username']}/" | ||
f"{project_config['github_owner']}/" | ||
f"{project_config['expected_repo_name']}.git" in cookie.stdout | ||
) | ||
else: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters