You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, auto-changelog treats the PR reference at the end of a changelog entry as optional. That means that although we usually see changelog entries such as:
- Upgrade `@metamask/foo` from `^1.0.0` to `^1.1.0` ([#123](https://github.com/MetaMask/foo/pull/123))
the following entry would also be valid:
- Upgrade `@metamask/foo` from `^1.0.0` to `^1.1.0`
This was likely done intentionally so as not to break existing changelogs for older libraries that were created before adopting Keep a Changelog. However, most changelogs for frequently maintained repos probably use this spec by now.
With that said, we are moving to a new process where we ask contributors to the core monorepo to update changelogs as they are making new changes. To do this, we need to ensure that changelog entries include PR numbers. This requirement introduces a bit of a chicken-and-egg situation where a PR number cannot be added if no PR has been created yet. Therefore, we could ask contributors to push their branch without PR references, then go back and update their changelogs once they've created the PR.
To enforce this workflow, we need to add a verification step to auto-changelog which ensures that all entries in a changelog have PR links or fails. We could also make this opt-in by adding a new option to the validate method so that existing projects that use auto-changelog validate during their lint step do not fail (we can add that option when we like). This would allow us to run this validation step in core, thereby forcing the developer to add PR links to changelogs before they can merge their PR.
Currently,
auto-changelog
treats the PR reference at the end of a changelog entry as optional. That means that although we usually see changelog entries such as:the following entry would also be valid:
This was likely done intentionally so as not to break existing changelogs for older libraries that were created before adopting Keep a Changelog. However, most changelogs for frequently maintained repos probably use this spec by now.
With that said, we are moving to a new process where we ask contributors to the
core
monorepo to update changelogs as they are making new changes. To do this, we need to ensure that changelog entries include PR numbers. This requirement introduces a bit of a chicken-and-egg situation where a PR number cannot be added if no PR has been created yet. Therefore, we could ask contributors to push their branch without PR references, then go back and update their changelogs once they've created the PR.To enforce this workflow, we need to add a verification step to
auto-changelog
which ensures that all entries in a changelog have PR links or fails. We could also make this opt-in by adding a new option to thevalidate
method so that existing projects that useauto-changelog validate
during their lint step do not fail (we can add that option when we like). This would allow us to run this validation step incore
, thereby forcing the developer to add PR links to changelogs before they can merge their PR.References
This blocks MetaMask/core#4385.
Acceptance Criteria
auto-changelog validate
passing an option that enables verifying the presence of PR links in changelogs.The text was updated successfully, but these errors were encountered: