Skip to content

Commit

Permalink
Update updating docs (#55)
Browse files Browse the repository at this point in the history
* The unwanted regeneration is fixed already.
* We now have automated template update PRs via RenovateBot.
  • Loading branch information
lkubb authored Sep 24, 2024
1 parent 5fe0387 commit 57358f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/topics/organization/submitting.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ By hosting your project within the organization, you gain:

- A fully configured repository with maintainer rights and pre-configured CI.
- Increased discoverability of your extension.
- Automated Copier template updates (not yet implemented).
- Automated Copier template updates.

## Requesting a repository

Expand Down
19 changes: 8 additions & 11 deletions docs/topics/updating.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,21 @@ Manual updates let you:
```bash
git status
```
4. Remove any unwanted regenerated boilerplate files (a subset of `ls src/**/*_mod.py tests/**/test_*.py`).[^skip-if-exists-issue]
5. Review, then stage the changes:
4. Review, then stage the changes:
```bash
git status
git diff
git add .
```
6. Run `pre-commit` on the entire repository and ensure it passes:
5. Run `pre-commit` on the entire repository and ensure it passes:
```bash
pre-commit run -a
```
7. Commit and submit the update via a PR:
6. Commit and submit the update via a PR:
```bash
git add . && git commit -m "Update to Copier template 0.3.7" && git push
git add . && git commit -m "Update to Copier template 0.4.2" && git push
```

[^skip-if-exists-issue]: Currently, there is an issue where default boilerplate files are regenerated if they were deleted. This will be fixed soon, but depends on a new Copier release.

#### Skip reviewing answers

To skip reviewing existing answers:
Expand All @@ -67,13 +64,13 @@ This command is non-interactive.
To update to a specific template version:

```bash
copier update --trust --skip-answered --vcs-ref=0.3.7
copier update --trust --skip-answered --vcs-ref=0.4.2
```

## Automatic update

[RenovateBot](https://docs.renovatebot.com/) supports updating Copier templates. If your repository is hosted within the `salt-extensions` GitHub organization, automated PRs for template updates will be provided in the future. Review these carefully before merging.
[RenovateBot](https://docs.renovatebot.com/) supports updating Copier templates. If your repository is hosted within the [`salt-extensions` organization](gh-org-ref), you will receive automated PRs for template updates. Review these carefully before merging and ensure CI is passing since Renovate will submit merge conflicts - it adds a PR comment warning about them though.

:::{important}
This feature is not yet implemented due to an outstanding issue in Copier.
:::{hint}
When an update introduces a new Copier template question, the automated PR uses the default value. If you want to use a custom one, just perform a manual update.
:::

0 comments on commit 57358f4

Please sign in to comment.