-
Notifications
You must be signed in to change notification settings - Fork 2
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
Renaming github_username
to github_owner
+ generating __repo_name
& __repo_url
#409
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
ebf2649
Renaming github_user to github_owner + generating repo_name and repo_url
matt-graham a2026e1
Merge branch 'main' into mmg/rename-to-github-owner
matt-graham 969e0dc
Merge branch 'main' into mmg/rename-to-github-owner
matt-graham 9e29dca
Merge branch 'main' into mmg/rename-to-github-owner
paddyroddy 92fa293
Merge branch 'main' into mmg/rename-to-github-owner
paddyroddy dd1b2c5
Merge branch 'main' into mmg/rename-to-github-owner
dstansby 6b44623
Merge branch 'main' into mmg/rename-to-github-owner
paddyroddy 813f7f4
Merge branch 'main' into mmg/rename-to-github-owner
paddyroddy d104ed6
Merge branch 'main' into mmg/rename-to-github-owner
paddyroddy 1a6a22b
Change github_username to github_owner in package generation test
matt-graham d096585
Change references to github_user in tutorial to github_owner
matt-graham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ def test_initialisation_of_git_repo( | |
) -> None: | ||
"""Checks to see if git was correctly initialised if desired.""" | ||
test_config = { | ||
"github_username": "test-user", | ||
"github_owner": "test-user", | ||
"project_short_description": "description", | ||
"project_name": "Cookiecutter Test", | ||
"initialise_git_repository": initialise_git_repository, | ||
|
@@ -57,7 +57,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 {test_config['github_username']}/" | ||
f"gh repo create {test_config['github_owner']}/" | ||
f"cookiecutter-test -d " | ||
f"\"{test_config['project_short_description']}\" --public -r " | ||
f"origin --source cookiecutter-test" in result.stdout | ||
|
@@ -69,11 +69,11 @@ 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"{test_config['github_username']}/" | ||
f"{test_config['github_owner']}/" | ||
f"cookiecutter-test - 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"{test_config['github_username']}/" | ||
f"{test_config['github_owner']}/" | ||
f"cookiecutter-test.git" in result.stdout | ||
) |
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL
__variable
incookiecutter.json
, looks so clean!