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