Skip to content

Commit

Permalink
fix(CoAuthor)!: Change the order of CoAuthors and breaking change
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Test
Co-authored-by: Henri Remonen <81435393+HRemonen@users.noreply.github.com>
Co-authored-by: Henri Remonen <henri@remonen.fi>
  • Loading branch information
HRemonen committed Sep 9, 2023
1 parent 47443f2 commit 0ab9231
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Binary file modified commitsense
Binary file not shown.
13 changes: 8 additions & 5 deletions pkg/commit/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,18 @@ func createCommitMessage(commitInfo Info) string {
commitMessage += "\n\n" + commitInfo.CommitBody
}

if commitInfo.IsCoAuthored {
if commitInfo.IsBreakingChange || commitInfo.IsCoAuthored {
commitMessage += "\n"
for _, coauth := range commitInfo.CoAuthors {
commitMessage += "\nCo-authored-by: " + coauth
}
}

if commitInfo.IsBreakingChange {
commitMessage += "\n\nBREAKING CHANGE: " + commitInfo.BreakingChangeDescription
commitMessage += "\nBREAKING CHANGE: " + commitInfo.BreakingChangeDescription
}

if commitInfo.IsCoAuthored {
for _, coauth := range commitInfo.CoAuthors {
commitMessage += "\nCo-authored-by: " + coauth
}
}

return commitMessage
Expand Down

0 comments on commit 0ab9231

Please sign in to comment.