Skip to content

Commit

Permalink
Merge pull request #65 from plone/fix-templates-repo-name
Browse files Browse the repository at this point in the history
Fix outdated references to cookiecutter-plone
  • Loading branch information
davisagli authored Feb 11, 2025
2 parents 30e557d + 7e7f757 commit eef9e33
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ The updated list of templates can be found at the [cookieplone-templates](https:

| Environment Variable | Description | Example |
| --- | --- | --- |
| **COOKIEPLONE_REPOSITORY** | Where to look for templates to be used. | `COOKIEPLONE_REPOSITORY=/home/plone/cookiecutter-plone/ pipx run cookieplone` |
| **COOKIEPLONE_REPOSITORY** | Where to look for templates to be used. | `COOKIEPLONE_REPOSITORY=/home/plone/cookieplone-templates/ pipx run cookieplone` |
| **COOKIEPLONE_REPOSITORY_TAG** | Which tag/branch to use from a remote repository. | `COOKIEPLONE_REPOSITORY_TAG=experimental pipx run cookieplone` |
| **COOKIEPLONE_REPO_PASSWORD** | Password to use when using a remote repository that is password protected. | `COOKIEPLONE_REPO_PASSWORD=very-secure pipx run cookieplone` |

Expand Down
2 changes: 1 addition & 1 deletion cookieplone/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

## DEFAULT
COOKIEPLONE_REPO = "https://github.com/plone/cookieplone"
TEMPLATES_REPO = "https://github.com/plone/cookiecutter-plone"
TEMPLATES_REPO = "https://github.com/plone/cookieplone-templates"
REPO_DEFAULT = "gh:plone/cookieplone-templates"

## Config
Expand Down
2 changes: 1 addition & 1 deletion cookieplone/utils/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def signature_md(path: Path) -> str:
date_info = f"{datetime.now()}"
cookieplone = f"[Cookieplone ({__version__})]({settings.COOKIEPLONE_REPO})"
commit = git.get_last_commit(path)
template_title = "cookiecutter-plone"
template_title = "cookieplone-templates"
if not commit:
template_link = settings.TEMPLATES_REPO
else:
Expand Down
1 change: 1 addition & 0 deletions news/65.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix outdated references to cookiecutter-plone. @davisagli
4 changes: 2 additions & 2 deletions tests/utils/test_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ def test_signature_md_without_commit(no_repo):
result = internal.signature_md(no_repo)
assert isinstance(result, str)
assert result.startswith(f"Generated using [Cookieplone ({__version__})]")
assert "[cookiecutter-plone]" in result
assert "[cookieplone-templates]" in result


def test_signature_md_with_commit(tmp_repo):
result = internal.signature_md(tmp_repo)
assert isinstance(result, str)
assert result.startswith(f"Generated using [Cookieplone ({__version__})]")
assert re.search(r"\[cookiecutter-plone \([a-f0-9]{7}\)]\([^\)]*\)", result)
assert re.search(r"\[cookieplone-templates \([a-f0-9]{7}\)]\([^\)]*\)", result)

0 comments on commit eef9e33

Please sign in to comment.