-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 fix(changelog): fix subCommitScope default value and reduceHeadingL…
…evel (#670) * 🐛 fix(changelog): fix subCommitScope default value to null The commit includes changes in the packages/changelog/.changelogrc.js, packages/changelog/src/finalizeContext/index.ts, and packages/changelog/src/templates files. It fixes the default value of subCommitScope from an empty string to null when it is not defined in customConfig.scopeDisplayName. The change ensures that commits with no scope are appropriately sorted in commitGroups. * 💄 style: Update typeDisplayName.test.ts to use more appropriate emoji and wording * 💄 style: Update display names for commit types in changelog transformer This commit updates the display names for `build`, `chore`, and `ci` commit types in the `typeDisplayName` module of the changelog transformer. The emojis used to represent these types have been changed from 📦, 🔧, and 👷 to 👷, 🎫, and 🔧 respectively. This change applies to both English and Chinese display names. The update only affects style and does not impact the functionality of the code. * ✨ feat(changelog): Add support for custom type display map and scope display name This commit adds support for a custom type display map and scope display name to the changelog package. The `customTypeMap` property in the `ChangelogConfig` interface allows users to define a custom type display map, while the `scopeDisplayName` property allows users to specify a default display name for all scopes. These new features can be configured in the `customConfig.ts` file. This commit also includes some code refactoring and dependency updates. * ✅ test(change): fix test * 🔧 chore(changelog): update dependencies * ♻️ refactor(changelog): Use null instead of empty string for subCommitScope in finalizeContext test This commit refactors the code in finalizeContext index.test.ts file by using null instead of an empty string for subCommitScope. This change is done to fix a bug related to custom configuration scopeDisplayName. The commit does not add any new features nor affect performance. * ♻️ refactor(changelog): change typeDisplayName.ts to accept all CommitTypes in customTypeMap parameter * ♻️ refactor(changelog): Clean up finalizeContext test This commit refactors the finalizeContext test in the changelog package by removing unused imports, variables, and commented-out code. It also improves readability by removing unnecessary ternary operations and renaming variables for clarity. * ✅ test(changelog): fix test snapshots * ✨ feat(changelog): Add an option to show authors' avatars in summary template This commit adds an option to show authors' avatars in the summary template of the changelog package. The new functionality is achieved by introducing a new handlebar partial called "summary-avatar," which contains the code that generates avatars for each author. The mainTemplate variable is updated to include this new partial and replace the {{gitUserInfo}} placeholder with the appropriate code based on the showAuthor and showAuthorAvatar options from the customConfig object. * ♻️ refactor(changelog): refactor get user avatar func by github api
- Loading branch information
1 parent
e88caf5
commit e4da993
Showing
15 changed files
with
342 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletions
16
packages/changelog/src/finalizeContext/__snapshots__/index.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.