Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to verify that each changelog entry has an associated PR #150

Open
mcmire opened this issue Jul 5, 2023 · 0 comments
Open

Add a way to verify that each changelog entry has an associated PR #150

mcmire opened this issue Jul 5, 2023 · 0 comments

Comments

@mcmire
Copy link
Contributor

mcmire commented Jul 5, 2023

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.

References

This blocks MetaMask/core#4385.

Acceptance Criteria

  • It is possible to run auto-changelog validate passing an option that enables verifying the presence of PR links in changelogs.
  • This command passes if all of the entries in the changelog have PR links associated with them, and fails if any entry does not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants