go-semantic-release / semantic-release

📦🚀 semantic-release written in Go
https://go-semantic-release.xyz
MIT License
404 stars 43 forks source link

feat: add config to enable prettified changelogs #100

Closed timoknapp closed 3 years ago

timoknapp commented 3 years ago

Hi @christophwitzko ,

As already discussed in #3 (changelog-generator) here is the second of the two PRs regarding the prettified changelogs.

It will simple work with the changelog-generator-opt config which can be provided when running semantic-release. If you dont provide the config it wont prettify the changelogs of course.

Within this repo their is actually no change needed from a code perspective. I simply added a small print statement to indicate the config to the user.

Here is an example call including the final CHANGELOG.md:

./semantic-release --provider "gitlab" --token $TOKEN --provider-opt "gitlab_projectid=42" --no-ci --dry --changelog "CHANGELOG.md" --changelog-generator-opt "emojis=true"
[go-semantic-release]: version:
[go-semantic-release]: ci-condition plugin: default@1.2.2
[go-semantic-release]: provider plugin: GitLab@1.4.1
[go-semantic-release]: getting default branch...
[go-semantic-release]: found default branch: master
[go-semantic-release]: found current branch: master
[go-semantic-release]: found current sha: master
[go-semantic-release]: getting latest release...
[go-semantic-release]: found version: 1.1.2
[go-semantic-release]: getting commits...
[go-semantic-release]: analyzing commits...
[go-semantic-release]: commit-analyzer plugin: default@1.3.1
[go-semantic-release]: calculating new version...
[go-semantic-release]: new version: 1.1.3
[go-semantic-release]: generating changelog...
[go-semantic-release]: changelog-generator plugin: default@dev
[go-semantic-release]: changelog-generator prettified_output: true
[go-semantic-release]: DRY RUN: no release was created
cat CHANGELOG.md

## 1.1.3 (2020-12-08)

#### 🐞 Bug Fixes

* resolve refresh bug (a994ee5c)

Feel free to review, I am happy for feedback.

Regards Timo

christophwitzko commented 3 years ago

Hey @timoknapp, thanks for adding this cool feature to the changelog-generator. I am happy to merge the update for the README, but I would prefer to keep plugin-specific features out of the main project.

timoknapp commented 3 years ago

Totally, it was anyways only useful for debugging purposes. I'll remove the part from the main.go file.