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
[changelog] reference closed issues #806
Comments
Good suggestion. As I understand it GitHub has a predefined set of keywords that may be used to interact with issues. I suppose GitLab and Gitea can do the same but it's likely the set of keywords is not identical, thus some Git service specific customization may be needed. How would you like to see the rendered changelog? Given the sample commit message (title & body) you posted there will be 1 row marked as feature but then how should |
Note that semantic-release doesn't parse the keywords specific to each git service. For example, a commit with the message:
would render in the changelog as :
I don't think that's a big drawback, and probably saves a lot of hassle by not having to implement different set of keywords for each git service.
I think something simple, without needing to retrieve the detail of the issue would work well. Just adding If a commit closes more than 1 issue (like this), the changelog can just mention each issue after
I also have an edge case where the commit mentions an issue from another repo. It could happen when you have multiple repos in an organization, or in this case where the project is forked and the original repo has been archived. This commit has the message:
and is rendered as:
|
I see. For the time being if the changelog is rendered on GitHub and the content has explicit links or mentions an issue by number then the GitHub renderer will automatically convert links and issue references, as seen at https://github.com/jreleaser/jreleaser/releases/tag/v1.0.0-RC2 Where commits have the following titles and shas:
I believe GitLab and Gitea perform a similar feat. However, if explicit links are desired (currently the changelog has a setting for explicit sha links) then additional code for handling issue refs and arbitrary links is needed. Of course this works as referenced issues are found in the title, or if the body is rendered per commit. Does not work if only the title is rendered and the references are found in the body, which I think is the use case you're after, isn't it? |
Yes indeed. The link references is secondary. |
* fix: check whether input string is empty in escapeRegexChars * refactor(core): append slash to issue tracker URL via function parameter * fix(changelog): issue extraction cannot find multiple issues in the same content if the issue tracker was an empty string, it would match all numbers * feat(changelog): mention related issues
Released in v1.4.0 -> https://github.com/jreleaser/jreleaser/releases/tag/v1.4.0 |
Is your feature request related to a problem? Please describe.
I am evaluating jreleaser as a replacement for semantic-release for changelog generation. jreleaser doesn't mention the closed issues that are referenced in a conventional commit.
for example, the following commit message:
produced the following release note: https://github.com/junrar/junrar/releases/tag/v7.2.0
Describe the solution you'd like
It would be nice if jreleaser could parse the references to issues within commit messages, and add them to the changelog.
In a conventional commit, an issue could be referenced in the footer, like shown above, or directly in the body, for example:
Describe alternatives you've considered
other tools like semantic-release can do this
The text was updated successfully, but these errors were encountered: