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

feat(cz-commitlint): add emoji to title #3618

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

parloti
Copy link

@parloti parloti commented Jun 16, 2023

Description

Add an emoji in the title of the questions referring to the type of commit

Motivation and Context

Although emojis are already configured in config-conventional they are not used in cz-commitlint

TODO emoji + title

Usage examples

No need for configuration

How Has This Been Tested?

Tested in private repository

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Add an emoji in the title of the questions referring to the type of commit
@escapedcat
Copy link
Member

@parloti thanks! Any chance you can add a test for this?
@curly210102 what do you think about this PR?

@parloti
Copy link
Author

parloti commented Jun 17, 2023

@parloti thanks! Any chance you can add a test for this? @curly210102 what do you think about this PR?

Hi!
I'll add the tests, to cover the changes.

enumList = enumRuleList
.sort((a, b) => enumNames.indexOf(a) - enumNames.indexOf(b))
.map((enumName) => {
const enumDescription = enumDescriptions[enumName]?.description;
if (enumDescription) {
const emoji = enumDescriptions[enumName]?.emoji;
const prefix = emoji ? emoji + ' ' : '';
Copy link
Contributor

Choose a reason for hiding this comment

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

Due to the different number of characters in the composition of Emoji, it is necessary to determine the longest one and perform space alignment processing.

image

@escapedcat escapedcat marked this pull request as draft October 20, 2023 14:16
@ZeliosAriex
Copy link

will this be implemented in a near future :) ?

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

Successfully merging this pull request may close these issues.

4 participants