-
Notifications
You must be signed in to change notification settings - Fork 745
Description
After years of using changesets in our teams, some developers would still write very simplistic changeset files and they would omit some important information. We decided to enforce a fixed changeset file structure to make sure, that every changeset file answers a set of specific questions (What? Why? How?). This slightly backfired as changeset files may squash multi-line markdown text into a single line when displayed in preview mode. Again, we enforced more strict structure to keep the resulting changelog files readable. But developers keep making slight mistakes every now that lead to poorly readable markdown preview.
I would like to propose a new feature, that would enable using templates with changesets.
Example workflow:
We have ./.changesets/templates/default.md with following content.
<ticket>
- **What?** <Explain implementation details>
- **Why?** <Explain reasons, why do we need these changes>
- **How?** <Migration guide>- Developer runs
changeset add --template ./.changesets/templates/default.md - CLI prompts about changed packages and developer selects some and their corresponding bump types
- CLI generates the file (without asking for any additional user input) with the content of the template.
---
"my-package": patch
---
<ticket>
- **What?** <Explain implementation details>
- **Why?** <Explain reasons, why do we need these changes>
- **How?** <Migration guide>- Developer edits the generated file to add missing information.
- Commit&Push
Is this something, you would be interested in? I can start a PR, if this sounds interesting as we would benefit from this a lot.