Proposal: Add ability to add custom questions/tags when creating a changeset

Author: BlaszCreated Aug 13, 2020Updated Sep 22, 2026
Labelsdiscussion

We'd like the ability to add custom questions when creating a changeset that we can then use to add metadata to changelog entries, similar to something like https://github.com/commitizen/cz-cli.

Our concrete use case is wanting to flag UI/UX changes in a consistent matter so that downstream package consumers can handle them, eventually in an automated fashion.

Some specific requirements:

  1. Prevent scenarios where users forget to or unknowingly create a changeset that isn't flagged when it should be
  2. Reasonable dev experience
  3. Ability to customise changelog messages in a consistent manner

Proposal 1 - Manipulate changeset summary at changeset generation time

We would add one changelog function for asking questions and another for manipulating a changeset summary. The data returned from the questions would be passed to the changeset summary manipulation function. The manipulated changeset summary is then written to the changeset file.

We might be able to initially implement this in a wrapper around changesets but the DX wouldn't be as nice.

Proposal 2 - Add metadata to changeset frontmatter and manipulate changeset summaries at changelog generation time (version cmd)

We could change the structure of changeset frontmatter to be able to include custom metadata that is then passed to the existing getReleaseLine changelog function at the versioning stage. Default metadata values could be predefined in changesets config and always written for new changesets. Custom questions could be added via config that map to certain metadata fields.

Some benefits to this approach are:

  • structured metadata opens up further possibility for tooling/automation in general
  • decouples metadata from presentational layer, allowing us to lint that all metadata fields are supplied. For example, if there is a UX change boolean field to signal whether something is a UX change that we then use to append [ux] to the changelog summary. We cannot detect whether someone has explicitly said their change isn't a UX change versus them unknowingly omitting it (via outdated tooling/dependencies on their local machine or otherwise).
  • prevents users from accidentally removing a tag from their changelog summary when editing it

Adding metadata to changeset frontmatter would most likely require a restructuring so that packages are placed under their own field. Otherwise we could use a 'special' key that used invalid npm package name characters for metadata and keep the existing structure.

Semi-related to https://github.com/atlassian/changesets/issues/390 which would also require frontmatter modifications