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

Auto-linked references to commits/PRs in changelog #1109

Open
paduszyk opened this issue May 15, 2024 · 3 comments
Open

Auto-linked references to commits/PRs in changelog #1109

paduszyk opened this issue May 15, 2024 · 3 comments
Labels

Comments

@paduszyk
Copy link
Contributor

Description

We all use GitHub's auto-links to refer to commits and pull requests.

I think it would be nice if the changelogs generated by the tool had them as well.

Commits added by push and squash merge could have SHA1 and PR references, respectively, appended, e.g.:

  • fix: resolve an urgent issue [abcd123]
  • feat: add a new feature (#1)

Possible Solution

I believe this proposal would require:

  • update the default templates (SHA1 is already found in the context);
  • update commit parser to detect that the commit message includes r"#\d+"

Additional context

This would also require adding (somewhere in the settings) extra info on the base URL for the repo.

If they are not found, the auto-link generation may be disabled by default.

Additional context

No response

@woile
Copy link
Member

woile commented May 15, 2024

For the commits hash, here's an example on how to do a special rule for commitizen (the example is with commit.author, but as you said, the hash is there).
https://commitizen-tools.github.io/commitizen/customization/#custom-changelog-generator

For the github issue, does this not work? git commit -am "feat: my new feature #23" and when commitizen generates the changelog the link appears.

@paduszyk
Copy link
Contributor Author

Nope. Referring to PRs does not result in a link. It's even evidenced by the changelog for this repo.

@Lee-W
Copy link
Member

Lee-W commented May 20, 2024

I like this feature and think this would be pretty useful, but I'm not sure whether it might incur additional to maintain the core commitizen 🤔 @woile @noirbizarre WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants