Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ› fix(changelog): fix subCommitScope default value and reduceHeadingLevel #670

Merged
merged 12 commits into from
Jun 12, 2023

Conversation

canisminor1990
Copy link
Contributor

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.

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.
@codecov
Copy link

codecov bot commented Jun 10, 2023

Codecov Report

Merging #670 (20c65b5) into master (e88caf5) will increase coverage by 9.96%.
The diff coverage is 90.62%.

@@            Coverage Diff             @@
##           master     #670      +/-   ##
==========================================
+ Coverage   76.59%   86.55%   +9.96%     
==========================================
  Files          26       26              
  Lines         282      305      +23     
  Branches       73       81       +8     
==========================================
+ Hits          216      264      +48     
+ Misses         61       36      -25     
  Partials        5        5              
Impacted Files Coverage ฮ”
packages/changelog/src/customConfig.ts 100.00% <รธ> (รธ)
packages/changelog/src/handleWriterOpts.ts 96.66% <80.00%> (-3.34%) โฌ‡๏ธ
packages/changelog/src/transformer/index.ts 72.58% <85.71%> (+2.58%) โฌ†๏ธ
packages/changelog/src/finalizeContext/index.ts 88.88% <100.00%> (+80.31%) โฌ†๏ธ
...kages/changelog/src/transformer/typeDisplayName.ts 100.00% <100.00%> (รธ)

๐Ÿ“ฃ Weโ€™re building smart automated test selection to slash your CI/CD build times. Learn more

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.
โ€ฆ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.
โ€ฆtScope 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.
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.
โ€ฆ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.
@canisminor1990
Copy link
Contributor Author

done

@@ -33,13 +33,16 @@
"test": "jest"
},
"dependencies": {
"@ardatan/sync-fetch": "^0",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ๅพ—ๅ†™ๆˆ ^0.x

^0 ไธไผšๅŽปๆ‰พๆœ€ๆ–ฐ็š„็‰ˆๆœฌ

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ไปฅๅŠไธบๅ•ฅๆ˜ฏ็”จ่ฟ™ไธชๅŒ…็š„ fetch ๏ผŒๆ˜ฏๆœ‰ไป€ไนˆ็‰นๆฎŠ็š„ไนˆ๏ผŸ

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ๆˆ‘่ฏ•ไธ‹ๆฅ 0 ไผšๅŽปๆ‰พๆœ€ๆ–ฐ็‰ˆๆœฌ่ฏถ....?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ไปฅๅŠไธบๅ•ฅๆ˜ฏ็”จ่ฟ™ไธชๅŒ…็š„ fetch ๏ผŒๆ˜ฏๆœ‰ไป€ไนˆ็‰นๆฎŠ็š„ไนˆ๏ผŸ

fetch ็š„ๅŒๆญฅ็‰ˆๆœฌ

@arvinxx
Copy link
Owner

arvinxx commented Jun 12, 2023

close #156

@arvinxx arvinxx merged commit e4da993 into arvinxx:master Jun 12, 2023
3 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 12, 2023
### [Version&nbsp;1.5.2](https://github.com/arvinxx/gitmoji-commit-workflow/compare/conventional-changelog-gitmoji-config@1.5.1...conventional-changelog-gitmoji-config@1.5.2)
<sup>Released on **2023-06-12**</sup>

#### ๐Ÿ› Bug Fixes

- **changelog**: Fix subCommitScope default value and reduceHeadingLevel.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **changelog**: Fix subCommitScope default value and reduceHeadingLevel, closes [#670](#670) ([e4da993](e4da993))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@github-actions
Copy link

๐ŸŽ‰ This PR is included in version 1.5.3 ๐ŸŽ‰

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

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

@github-actions
Copy link

๐ŸŽ‰ This PR is included in version 1.5.2 ๐ŸŽ‰

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

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants