Skip to content

Commit

Permalink
feat: add gitmoji support (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Intevel authored Jun 29, 2022
1 parent d16bf4a commit 4346f61
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"dependencies": {
"c12": "^0.2.7",
"consola": "^2.15.3",
"convert-gitmoji": "^0.1.0",
"execa": "^6.1.0",
"mri": "^1.2.0",
"scule": "^0.2.1"
Expand Down
27 changes: 17 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/markdown.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { upperFirst } from 'scule'
import { convert } from 'convert-gitmoji'
import type { ChangelogConfig } from './config'
import type { GitCommit } from './git'

Expand Down Expand Up @@ -47,7 +48,7 @@ export function generateMarkDown (commits: GitCommit[], config: ChangelogConfig)
markdown.push(`See all changes: https://github.com/${config.github}/compare/${config.from}...${config.to}`)
}

return markdown.join('\n').trim()
return convert(markdown.join('\n').trim(), true)
}

function formatCommit (commit: GitCommit) {
Expand Down

0 comments on commit 4346f61

Please sign in to comment.