feat(core): add emoji feature to commently#703
Open
renjialan wants to merge 1 commit intointuit:masterfrom
Open
feat(core): add emoji feature to commently#703renjialan wants to merge 1 commit intointuit:masterfrom
renjialan wants to merge 1 commit intointuit:masterfrom
Conversation
Implement custom emoji support in comment titles
Aghassi
requested changes
Sep 18, 2024
Contributor
Aghassi
left a comment
There was a problem hiding this comment.
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?
| "dependencies": { | ||
| "@types/node": "10.14.22" | ||
| "@types/node": "10.14.22", | ||
| "commently-cli": "^6.27.0" |
Contributor
There was a problem hiding this comment.
I don't believe this change is needed
| --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 |
Contributor
There was a problem hiding this comment.
The description here is wrong, please update
| '-h': '--help', | ||
| '-v': '--verbose' | ||
| '-v': '--verbose', | ||
| '-e': '--emoji', |
Contributor
There was a problem hiding this comment.
Is there a reason to use this over the --message or --title flag?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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