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(core): add emoji feature to commently #703

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

Conversation

renjialan
Copy link

Implement custom emoji support in comment titles

What does this change do and why

This pull request implements custom emoji support in comment titles for the Commently bot. The changes allow users to specify a custom emoji when initializing the Commently class, which will then be displayed at the beginning of the comment title.

Key changes include:

Updated the CommentlyArgs interface to include an optional emoji parameter.
Added a new private property emoji to the Commently class.
Modified the constructor to initialize the emoji with a default value of '💬' if not provided.
Updated the header property initialization to include the emoji before the title.
These changes enhance the customization options for users of the Commently bot, allowing for more expressive and visually appealing comments. The emoji feature can help distinguish different types of automated comments or simply add a touch of personality to the bot's interactions.

Implementation details:
The emoji is optional, defaulting to '💬' if not specified.
The emoji is inserted at the beginning of the comment title, separated from the title text by a space.
The CLI has been updated to accept an --emoji option for easy customization.
Testing:
Unit tests have been added to verify the correct handling of custom emojis.
Manual testing has been performed using the CLI with various emoji inputs.
This feature aligns with the project's goal of providing flexible and user-friendly automated commenting capabilities for GitHub pull requests

Implement custom emoji support in comment titles
Copy link
Contributor

@Aghassi Aghassi left a comment

Choose a reason for hiding this comment

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

Thanks for the contrib! I need a better understanding of how this change improves over the existing flags. Also there is some duplicate code and unnecessary changes in this config. Can you please address?

@@ -91,6 +91,7 @@
},
"license": "MIT",
"dependencies": {
"@types/node": "10.14.22"
"@types/node": "10.14.22",
"commently-cli": "^6.27.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe this change is needed

@@ -41,6 +44,7 @@ if (args['--help']) {
--useHistory Boolean : Keep a history of the comments in the comment created by this library
--help, -h Boolean : Show the help dialog
--verbose, -v Boolean : Output the debug log
--emoji, -e Boolean : Output the debug log
Copy link
Contributor

Choose a reason for hiding this comment

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

The description here is wrong, please update

// Aliases
'-m': '--message',
'-t': '--title',
'-h': '--help',
'-v': '--verbose'
'-v': '--verbose',
'-e': '--emoji',
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to use this over the --message or --title flag?

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

Successfully merging this pull request may close these issues.

2 participants