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(version): provide custom format to include commit author fullname #269

Merged
merged 1 commit into from Jul 21, 2022

Conversation

ghiscoding
Copy link
Member

@ghiscoding ghiscoding commented Jul 21, 2022

Description

Add a new flag --changelog-include-commit-author-fullname [msg] to specify if we want to include the git commit author's name, at the end of each changelog commit entry, this is only available when using --conventional-commits with changelogs. The default format will append the author's name at the end of each commit entry and wrapped in (), for exampe "feat: commit message (Author Name)". We could also use a custom format by providing the %a token. Note that in every case, the author's name will always be appended as a suffix to each changelog commit entry.

Motivation and Context

This improves the previous implementation done in PR #253, the previous implementation assumed wrongly that the author name was the same as the GitHub username while in fact it's totally different and is instead the name configured in git. This partially addresses issue #248

This PR adds the following flag
--changelog-include-commit-author-fullname [msg]
it was previously implemented as a different flag name --changelog-include-commit-author

A future PR is expected to add a second flag to add the GitHub username
--changelog-include-commit-author-username [msg]

How Has This Been Tested?

Types of changes

  • Chore (change that has absolutely no effect on users)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

Merging #269 (a4d36a0) into main (be39852) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #269      +/-   ##
==========================================
+ Coverage   93.83%   93.84%   +0.01%     
==========================================
  Files         142      142              
  Lines        4097     4101       +4     
  Branches      841      844       +3     
==========================================
+ Hits         3844     3848       +4     
  Misses        253      253              
Impacted Files Coverage Δ
...kages/cli/src/cli-commands/cli-version-commands.ts 100.00% <ø> (ø)
packages/version/src/version-command.ts 100.00% <ø> (ø)
.../core/src/conventional-commits/update-changelog.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be39852...a4d36a0. Read the comment docs.

@ghiscoding ghiscoding merged commit 1f5a94e into main Jul 21, 2022
@ghiscoding ghiscoding deleted the feat/commit-author-fullname branch July 21, 2022 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant