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

feat(changelog): handle BREAKING CHANGE from footer #1087

Merged
merged 1 commit into from Dec 6, 2022

Conversation

gotson
Copy link
Contributor

@gotson gotson commented Dec 5, 2022

Fixes #809

Context

Introduces a new ConventionalCommit subtype of Commit, which parses the commit body according to conventional commit specification. The conventional-commit preset uses a custom changelog.format instead of replacers to achieve formatting. The changelog presets can now have a custom format.

Checklist

@CLAassistant
Copy link

CLAassistant commented Dec 5, 2022

CLA assistant check
All committers have signed the CLA.

@gotson gotson force-pushed the changelog-cc-breakingchange branch 2 times, most recently from 8c69156 to 61a440a Compare December 5, 2022 10:39
@gotson
Copy link
Contributor Author

gotson commented Dec 5, 2022

The documentation may need some updates, but i am not sure what !

@aalmiray
Copy link
Member

aalmiray commented Dec 5, 2022

It’s OK, I can take care of the docs. Thank you for the PR! 😁

@gotson
Copy link
Contributor Author

gotson commented Dec 5, 2022

I haven't included yet any change about #806, i wanted to tackle things one at a time. If that PR gets merged, i will have a look at that afterwards.

@aalmiray
Copy link
Member

aalmiray commented Dec 5, 2022

PR failed because of missing license headers. Please invoke ./gradlew licenseFormat && ./gradlew check before pushing one more time.

@gotson
Copy link
Contributor Author

gotson commented Dec 6, 2022

PR failed because of missing license headers. Please invoke ./gradlew licenseFormat && ./gradlew check before pushing one more time.

Would that make sense to add the need to run ./gradlew licenseFormat to the Contribution Guidelines ?

@gotson gotson force-pushed the changelog-cc-breakingchange branch from 61a440a to 4a063f4 Compare December 6, 2022 03:03
@gotson
Copy link
Contributor Author

gotson commented Dec 6, 2022

On top of the above requested changes, i have also:

  • prefixed the name of the properties for the Mustache context with conventionalCommit to avoid confusion
  • introduced a separate ccBody field instead of using the existing Commit.body, which i noticed was used by the labelers with regex.

@gotson gotson marked this pull request as draft December 6, 2022 03:55
@gotson
Copy link
Contributor Author

gotson commented Dec 6, 2022

I'm putting this back to draft, for some reason i can't get the mustache context to contain the additional properties anymore. It used to work, and doesn't since my latest changes, but i have no idea why.

Introduces a new ConventionalCommit subtype of Commit, which parses the commit body according to conventional commit specification.
The conventional-commit preset uses a custom changelog.format instead of replacers to achieve formatting.
The changelog presets can now have a custom format.

Closes: jreleaser#809
@gotson gotson force-pushed the changelog-cc-breakingchange branch from 4a063f4 to 948c9af Compare December 6, 2022 05:20
@gotson gotson marked this pull request as ready for review December 6, 2022 05:20
@gotson
Copy link
Contributor Author

gotson commented Dec 6, 2022

I found the problem, should be ready for review!

@aalmiray aalmiray added the enhancement New feature or request label Dec 6, 2022
@aalmiray aalmiray added this to the v1.4.0 milestone Dec 6, 2022
@aalmiray
Copy link
Member

aalmiray commented Dec 6, 2022

Looking pretty good! I wonder if the concept of trailers should be added to the base Commit class a well. We can of course revisit this idea after this PR has been merged.

@aalmiray aalmiray merged commit 232b7a2 into jreleaser:main Dec 6, 2022
@aalmiray
Copy link
Member

aalmiray commented Dec 6, 2022

Thanks! 😄

@gotson
Copy link
Contributor Author

gotson commented Dec 6, 2022

Looking pretty good! I wonder if the concept of trailers should be added to the base Commit class a well. We can of course revisit this idea after this PR has been merged.

Yes, good idea, since conventional commits follows the standard git trailers convention. Could be used for the contributors i think!

@gotson gotson deleted the changelog-cc-breakingchange branch December 6, 2022 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[changelog] pickup BREAKING CHANGE: from footer
3 participants