Skip to content

Commit

Permalink
style: 🎨 format little codes
Browse files Browse the repository at this point in the history
  • Loading branch information
yi-Xu-0100 committed Mar 24, 2021
1 parent 326c953 commit a42c75b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"out": true
},
"typescript.tsc.autoDetect": "off",
"svg.preview.background": "black"
"svg.preview.background": "black",
"conventionalCommits.emojiFormat": "code"
}
5 changes: 2 additions & 3 deletions src/lib/commit-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ export function serialize(
detectBreakingChange,
});
const { breakingChange, body, footer } = commitMessage;
if (body) {
message += `\n\n${body}`;
}
if (body) message += `\n\n${body}`;

if (breakingChange && breakingChange != '!') {
message += `\n\n${breakingChange}`;
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/conventional-commits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default function createConventionalCommits() {
output.appendLine(
`commitMessage: ${JSON.stringify(commitMessage, null, 2)}`,
);
let message = serialize(commitMessage, detectBreakingChange);
const message = serialize(commitMessage, detectBreakingChange);
output.appendLine(`message: ${message}`);

// 6. switch to scm and put message into message box or show the entire commit message in a separate tab
Expand Down

0 comments on commit a42c75b

Please sign in to comment.