arvinxx / gitmoji-commit-workflow

😉 Gitmoji Commit Workflow
MIT License
211 stars 26 forks source link

✨ feat(changelog): add style configs #669

Closed canisminor1990 closed 1 year ago

canisminor1990 commented 1 year ago

Add configs showAuthorAvatar showSummary reduceHeadingLevel newlineTimestamp addBackToTop

interface ChangelogConfig {
  /**
   * title language
   * @default en-US
   */
  titleLanguage?: 'en-US' | 'zh-CN' | 'mix';
  /**
   * whether to show author avatar
   * @default false
   */
  showAuthorAvatar?: boolean;
  /**
   * whether to show summary
   * @default false
   */
  showSummary?: boolean;
  /**
   * reduce heading level from # to ##
   * @default false
   */
  reduceHeadingLevel?: boolean;
  /**
   * put timestamp to second line
   * @default false
   */
  newlineTimestamp?: boolean;
  /**
   * add back to top button
   * @default false
   */
  addBackToTop?: boolean;
}

Changelog Demo

// .changelogrc.js

module.exports = {
  titleLanguage: 'mix',
  showAuthor: true,
  showAuthorAvatar: true,
  newlineTimestamp: true,
  reduceHeadingLevel: true,
  addBackToTop: true,
  showSummary: true,
  scopeDisplayName: {
    '*': 'misc',
  },
};

Version 1.4

Released on 2023-06-07

✨ Features | 新特性

🐛 Bug Fixes | 修复


Improvements and Fixes ##### What's improved * **changelog**: Add chinese title ([be9b4f2](https://github.com/arvinxx/gitmoji-commit-workflow/commit/be9b4f2)) - by [ **arvinxx**](https://github.com/arvinxx) * **changelog**: Add configs `showAuthorAvatar` `showSummary` `reduceHeadingLevel` `newlineTimestamp` `addBackToTop` ([3b6ef45](https://github.com/arvinxx/gitmoji-commit-workflow/commit/3b6ef45)) - by [ **canisminor1990**](https://github.com/canisminor1990) * **changelog**: Add gitmoji changelog config ([2180a88](https://github.com/arvinxx/gitmoji-commit-workflow/commit/2180a88)) - by [ **arvinxx**](https://github.com/arvinxx) * **changelog**: Add scopeDisplayName config, closes [#9](https://github.com/arvinxx/gitmoji-commit-workflow/issues/9) ([a55ba89](https://github.com/arvinxx/gitmoji-commit-workflow/commit/a55ba89)) - by [ **arvinxx**](https://github.com/arvinxx) * **changelog**: Add summary avatar list ([85b0187](https://github.com/arvinxx/gitmoji-commit-workflow/commit/85b0187)) - by [ **canisminor1990**](https://github.com/canisminor1990) * **changelog**: Add type display config ([f727fc6](https://github.com/arvinxx/gitmoji-commit-workflow/commit/f727fc6)) - by [ **arvinxx**](https://github.com/arvinxx) * **changelog**: Better summary style ([58770ae](https://github.com/arvinxx/gitmoji-commit-workflow/commit/58770ae)) - by [ **canisminor1990**](https://github.com/canisminor1990) * **changelog**: Bump up version ([159b071](https://github.com/arvinxx/gitmoji-commit-workflow/commit/159b071)) - by [ **arvinxx**](https://github.com/arvinxx) * **changelog**: Empty to bump up version ([66c8130](https://github.com/arvinxx/gitmoji-commit-workflow/commit/66c8130)) - by [ **arvinxx**](https://github.com/arvinxx) * **commit-type**: Extract commit-type package ([b920f38](https://github.com/arvinxx/gitmoji-commit-workflow/commit/b920f38)) - by [ **arvinxx**](https://github.com/arvinxx) * **commit-type**: Extract commit-type package ([8308682](https://github.com/arvinxx/gitmoji-commit-workflow/commit/8308682)) - by [ **arvinxx**](https://github.com/arvinxx) * **commit-type**: Extract commit-type package ([90ba224](https://github.com/arvinxx/gitmoji-commit-workflow/commit/90ba224)) - by [ **arvinxx**](https://github.com/arvinxx) * **commit-types**: Add wip types ([a3642c5](https://github.com/arvinxx/gitmoji-commit-workflow/commit/a3642c5)) - by [ **arvinxx**](https://github.com/arvinxx) * **config-monorepo**: Add modules ([68315df](https://github.com/arvinxx/gitmoji-commit-workflow/commit/68315df)) - by [ **arvinxx**](https://github.com/arvinxx) * **config-monorepo**: Add scope lint ([7f635e9](https://github.com/arvinxx/gitmoji-commit-workflow/commit/7f635e9)) - by [ **arvinxx**](https://github.com/arvinxx) * **config**: Support more config type ([f642dc8](https://github.com/arvinxx/gitmoji-commit-workflow/commit/f642dc8)) - by [ **arvinxx**](https://github.com/arvinxx) * **config**: Support more config type ([84db257](https://github.com/arvinxx/gitmoji-commit-workflow/commit/84db257)) - by [ **arvinxx**](https://github.com/arvinxx) * **description**: Update package description ([56dd470](https://github.com/arvinxx/gitmoji-commit-workflow/commit/56dd470)) - by [ **arvinxx**](https://github.com/arvinxx) * **i18n**: Support on or off emoji ([6ad63c4](https://github.com/arvinxx/gitmoji-commit-workflow/commit/6ad63c4)) - by [ **arvinxx**](https://github.com/arvinxx) * **i18n**: Support switch language ([c7dfa78](https://github.com/arvinxx/gitmoji-commit-workflow/commit/c7dfa78)) - by [ **arvinxx**](https://github.com/arvinxx) * **parser-opts**: Add custom config ([303f924](https://github.com/arvinxx/gitmoji-commit-workflow/commit/303f924)) - by [ **arvinxx**](https://github.com/arvinxx) * **parser-opts**: Extract parser-opts packages ([a4e2c91](https://github.com/arvinxx/gitmoji-commit-workflow/commit/a4e2c91)) - by [ **arvinxx**](https://github.com/arvinxx) * **parser-opts**: Support parsing Chinese ([0c24103](https://github.com/arvinxx/gitmoji-commit-workflow/commit/0c24103)) - by [ **arvinxx**](https://github.com/arvinxx) * **parser-opts**: Support UCS-4 unicode ([bc09794](https://github.com/arvinxx/gitmoji-commit-workflow/commit/bc09794)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Add emoji rule ([66b2387](https://github.com/arvinxx/gitmoji-commit-workflow/commit/66b2387)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Add git options ([cd1ab94](https://github.com/arvinxx/gitmoji-commit-workflow/commit/cd1ab94)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Add github config ([3d540ca](https://github.com/arvinxx/gitmoji-commit-workflow/commit/3d540ca)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Add new monorepo params to work with monorepo ([6fdbc7f](https://github.com/arvinxx/gitmoji-commit-workflow/commit/6fdbc7f)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Add new monorepo params to work with monorepo ([0c6cd36](https://github.com/arvinxx/gitmoji-commit-workflow/commit/0c6cd36)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Add new release configuration ([ae6ff31](https://github.com/arvinxx/gitmoji-commit-workflow/commit/ae6ff31)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Add npm config ([3d4c5d5](https://github.com/arvinxx/gitmoji-commit-workflow/commit/3d4c5d5)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Add npm config ([f15d677](https://github.com/arvinxx/gitmoji-commit-workflow/commit/f15d677)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Add rc release config, closes [#661](https://github.com/arvinxx/gitmoji-commit-workflow/issues/661) ([2201864](https://github.com/arvinxx/gitmoji-commit-workflow/commit/2201864)) - by [ **Arvin Xu**](https://github.com/Arvin%20Xu) * **misc**: Add style and build to release rule ([acd7860](https://github.com/arvinxx/gitmoji-commit-workflow/commit/acd7860)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Support config creator ([cf5de70](https://github.com/arvinxx/gitmoji-commit-workflow/commit/cf5de70)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Support gitmoji unicode ([6f418a7](https://github.com/arvinxx/gitmoji-commit-workflow/commit/6f418a7)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Support GITMOJI_PATH env ([9a6fd23](https://github.com/arvinxx/gitmoji-commit-workflow/commit/9a6fd23)) - by [ **Arvin Xu**](https://github.com/Arvin%20Xu) * **misc**: Support GITMOJI_PATH env ([8a81839](https://github.com/arvinxx/gitmoji-commit-workflow/commit/8a81839)) - by [ **Arvin Xu**](https://github.com/Arvin%20Xu) * **misc**: Support GITMOJI_PATH env, closes [#40](https://github.com/arvinxx/gitmoji-commit-workflow/issues/40) ([2d05da1](https://github.com/arvinxx/gitmoji-commit-workflow/commit/2d05da1)) - by [ **Arvin Xu**](https://github.com/Arvin%20Xu) * **misc**: Support local gitmoji path ([6b75a95](https://github.com/arvinxx/gitmoji-commit-workflow/commit/6b75a95)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Support release on main branch ([e97fb35](https://github.com/arvinxx/gitmoji-commit-workflow/commit/e97fb35)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Support release on main branch ([163ea4b](https://github.com/arvinxx/gitmoji-commit-workflow/commit/163ea4b)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Support UCS-4 emoji unicode ([006d8e4](https://github.com/arvinxx/gitmoji-commit-workflow/commit/006d8e4)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Support unicode parsing, closes [#13](https://github.com/arvinxx/gitmoji-commit-workflow/issues/13) ([0d5eece](https://github.com/arvinxx/gitmoji-commit-workflow/commit/0d5eece)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Update to new version ([84fdb4f](https://github.com/arvinxx/gitmoji-commit-workflow/commit/84fdb4f)) - by [ **arvinxx**](https://github.com/arvinxx) ##### What's fixed * **changelog**: 修正日志配置 ([e2eca6f](https://github.com/arvinxx/gitmoji-commit-workflow/commit/e2eca6f)) - by [ **arvinxx**](https://github.com/arvinxx) * **changelog**: 修正日志配置 ([9c9fd6b](https://github.com/arvinxx/gitmoji-commit-workflow/commit/9c9fd6b)) - by [ **arvinxx**](https://github.com/arvinxx) * **changelog**: Fix style type display name ([2fe4ecf](https://github.com/arvinxx/gitmoji-commit-workflow/commit/2fe4ecf)) - by [ **arvinxx**](https://github.com/arvinxx) * **changelog**: Fix summary spacing ([a46b40d](https://github.com/arvinxx/gitmoji-commit-workflow/commit/a46b40d)) - by [ **canisminor1990**](https://github.com/canisminor1990) * **changelog**: Footer position ([e8257de](https://github.com/arvinxx/gitmoji-commit-workflow/commit/e8257de)) - by [ **canisminor1990**](https://github.com/canisminor1990) * **changelog**: Remove scope brace ([5ae3807](https://github.com/arvinxx/gitmoji-commit-workflow/commit/5ae3807)) - by [ **arvinxx**](https://github.com/arvinxx) * **commit-types**: Add test documents ([947aacd](https://github.com/arvinxx/gitmoji-commit-workflow/commit/947aacd)) - by [ **arvinxx**](https://github.com/arvinxx) * **commitlint-config**: Upgrade header-max-length config in commitlint ([e59891f](https://github.com/arvinxx/gitmoji-commit-workflow/commit/e59891f)) - by [ **arvinxx**](https://github.com/arvinxx) * **config-monorepo**: Add test ([fc4b85f](https://github.com/arvinxx/gitmoji-commit-workflow/commit/fc4b85f)) - by [ **arvinxx**](https://github.com/arvinxx) * **config-monorepo**: Add test config ([4fa5e48](https://github.com/arvinxx/gitmoji-commit-workflow/commit/4fa5e48)) - by [ **arvinxx**](https://github.com/arvinxx) * **config-monorepo**: Fix version error ([1f364c3](https://github.com/arvinxx/gitmoji-commit-workflow/commit/1f364c3)) - by [ **arvinxx**](https://github.com/arvinxx) * **config-monorepo**: Test monorepo ([918f107](https://github.com/arvinxx/gitmoji-commit-workflow/commit/918f107)) - by [ **arvinxx**](https://github.com/arvinxx) * **config**: 修正日志版本 ([3b69ece](https://github.com/arvinxx/gitmoji-commit-workflow/commit/3b69ece)) - by [ **arvinxx**](https://github.com/arvinxx) * **config**: Fix a subject bug ([219afb2](https://github.com/arvinxx/gitmoji-commit-workflow/commit/219afb2)) - by [ **arvinxx**](https://github.com/arvinxx) * **config**: Fix version ([c535a78](https://github.com/arvinxx/gitmoji-commit-workflow/commit/c535a78)) - by [ **arvinxx**](https://github.com/arvinxx) * **config**: Fix version ([513e5bf](https://github.com/arvinxx/gitmoji-commit-workflow/commit/513e5bf)) - by [ **arvinxx**](https://github.com/arvinxx) * **config**: Fix version ([1db5de2](https://github.com/arvinxx/gitmoji-commit-workflow/commit/1db5de2)) - by [ **arvinxx**](https://github.com/arvinxx) * **config**: Fix version ([bc1ab28](https://github.com/arvinxx/gitmoji-commit-workflow/commit/bc1ab28)) - by [ **arvinxx**](https://github.com/arvinxx) * **package**: Clean unused files in package ([6805b75](https://github.com/arvinxx/gitmoji-commit-workflow/commit/6805b75)) - by [ **arvinxx**](https://github.com/arvinxx) * **parser-opts**: 优化脚本 ([9f25331](https://github.com/arvinxx/gitmoji-commit-workflow/commit/9f25331)) - by [ **arvinxx**](https://github.com/arvinxx) * **parser-opts**: Fix package description ([a4678ad](https://github.com/arvinxx/gitmoji-commit-workflow/commit/a4678ad)) - by [ **arvinxx**](https://github.com/arvinxx) * **parser-opts**: Fix package description ([81518c7](https://github.com/arvinxx/gitmoji-commit-workflow/commit/81518c7)) - by [ **arvinxx**](https://github.com/arvinxx) * **parser-opts**: Fix package description ([0de666e](https://github.com/arvinxx/gitmoji-commit-workflow/commit/0de666e)) - by [ **arvinxx**](https://github.com/arvinxx) * **parser-opts**: Fix package description ([c604677](https://github.com/arvinxx/gitmoji-commit-workflow/commit/c604677)) - by [ **arvinxx**](https://github.com/arvinxx) * **plugin**: Fix version ([764a0ca](https://github.com/arvinxx/gitmoji-commit-workflow/commit/764a0ca)) - by [ **arvinxx**](https://github.com/arvinxx) * **plugin**: Fix version ([9a5e7a9](https://github.com/arvinxx/gitmoji-commit-workflow/commit/9a5e7a9)) - by [ **arvinxx**](https://github.com/arvinxx) * **plugin**: Fix version ([cadac19](https://github.com/arvinxx/gitmoji-commit-workflow/commit/cadac19)) - by [ **arvinxx**](https://github.com/arvinxx) * **plugin**: Throw better fetch failed msg, closes [#12](https://github.com/arvinxx/gitmoji-commit-workflow/issues/12) ([c74a1ff](https://github.com/arvinxx/gitmoji-commit-workflow/commit/c74a1ff)) - by [ **arvinxx**](https://github.com/arvinxx) * **release-config**: Fix beta release config ([a330517](https://github.com/arvinxx/gitmoji-commit-workflow/commit/a330517)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: 修正 changelog 日志问题 ([c4053b2](https://github.com/arvinxx/gitmoji-commit-workflow/commit/c4053b2)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: 修正找不到 createConfig 模块的错误 ([bf451ca](https://github.com/arvinxx/gitmoji-commit-workflow/commit/bf451ca)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Add declaration ([c46d273](https://github.com/arvinxx/gitmoji-commit-workflow/commit/c46d273)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Allow parenthesis around ticket number ([3393666](https://github.com/arvinxx/gitmoji-commit-workflow/commit/3393666)) - by [ **Elenor**](https://github.com/Elenor) * **misc**: Clean changelog ([8479426](https://github.com/arvinxx/gitmoji-commit-workflow/commit/8479426)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Clean changelog ([0db0804](https://github.com/arvinxx/gitmoji-commit-workflow/commit/0db0804)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Corrected grammar of complaint message ([5bac55a](https://github.com/arvinxx/gitmoji-commit-workflow/commit/5bac55a)) - by [ **Josh Goldberg**](https://github.com/Josh%20Goldberg) * **misc**: Fix alpha release problem ([1af7ad0](https://github.com/arvinxx/gitmoji-commit-workflow/commit/1af7ad0)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Fix can't find createConfig ([8a01bff](https://github.com/arvinxx/gitmoji-commit-workflow/commit/8a01bff)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Fix can't find default ([427298d](https://github.com/arvinxx/gitmoji-commit-workflow/commit/427298d)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Fix config export error ([2577aed](https://github.com/arvinxx/gitmoji-commit-workflow/commit/2577aed)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Fix dependency error ([def947f](https://github.com/arvinxx/gitmoji-commit-workflow/commit/def947f)) - by [ **Arvin Xu**](https://github.com/Arvin%20Xu) * **misc**: Fix error message reference url ([351f081](https://github.com/arvinxx/gitmoji-commit-workflow/commit/351f081)) - by [ **Arvin Xu**](https://github.com/Arvin%20Xu) * **misc**: Fix error when there is no changelog config ([1ec76ee](https://github.com/arvinxx/gitmoji-commit-workflow/commit/1ec76ee)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Fix github rate limit on release ([3ec8a63](https://github.com/arvinxx/gitmoji-commit-workflow/commit/3ec8a63)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Fix missing module.exports when migration to father4 ([2da44fd](https://github.com/arvinxx/gitmoji-commit-workflow/commit/2da44fd)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Fix package description ([9022389](https://github.com/arvinxx/gitmoji-commit-workflow/commit/9022389)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Fix package homepage ([e611019](https://github.com/arvinxx/gitmoji-commit-workflow/commit/e611019)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Fix parser success without gitmoji ([780064f](https://github.com/arvinxx/gitmoji-commit-workflow/commit/780064f)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Link deps ([e4526ed](https://github.com/arvinxx/gitmoji-commit-workflow/commit/e4526ed)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Try to fix gitmoji unicode regex, closes [#662](https://github.com/arvinxx/gitmoji-commit-workflow/issues/662) [#56](https://github.com/arvinxx/gitmoji-commit-workflow/issues/56) [#493](https://github.com/arvinxx/gitmoji-commit-workflow/issues/493) ([acd12b1](https://github.com/arvinxx/gitmoji-commit-workflow/commit/acd12b1)) - by [ **arvinxx**](https://github.com/arvinxx) * **misc**: Try to fix release issue by lock gitmojis version ([c928267](https://github.com/arvinxx/gitmoji-commit-workflow/commit/c928267)) - by [ **arvinxx**](https://github.com/arvinxx)
[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
codecov[bot] commented 1 year ago

Codecov Report

Merging #669 (ecf5e08) into master (e97fb35) will decrease coverage by 9.84%. The diff coverage is 41.53%.

:exclamation: Current head ecf5e08 differs from pull request most recent head 29ffd7b. Consider uploading reports for the commit 29ffd7b to get more accurate results

@@            Coverage Diff             @@
##           master     #669      +/-   ##
==========================================
- Coverage   82.88%   73.04%   -9.84%     
==========================================
  Files          25       26       +1     
  Lines         222      282      +60     
  Branches       53       73      +20     
==========================================
+ Hits          184      206      +22     
- Misses         31       69      +38     
  Partials        7        7              
Impacted Files Coverage Δ
packages/changelog/src/customConfig.ts 100.00% <ø> (ø)
packages/changelog/src/finalizeContext/index.ts 8.57% <8.57%> (ø)
packages/changelog/src/transformer/index.ts 52.00% <54.54%> (-0.50%) :arrow_down:
packages/changelog/src/handleWriterOpts.ts 96.15% <93.75%> (-3.85%) :arrow_down:
...kages/changelog/src/transformer/typeDisplayName.ts 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.5.0 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.5.1 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket: