Add emojis for different sources - #100
Merged
Merged
Conversation
This change adds the octopus emoji for Github entries and the handwritten pencil emoji for manual entries to be able to distinguish the entries more easily visually.
There was a problem hiding this comment.
Pull request overview
This PR adds emoji prefixes to distinguish log entries from different sources visually. GitHub entries get an octopus emoji (🐙) and manual entries get a handwritten pencil emoji (✍️).
Changes:
- Added
source_prefixmethod toBaseFormatterthat returns emoji prefixes based on log entry source - Integrated the source prefix into the
formatmethod ofBaseFormatter - Added unit tests for the new
source_prefixmethod
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/log_entry_formatters.rb | Implements the source_prefix method and integrates it into the format method to prepend emojis based on source |
| test/log_entry_formatters_test.rb | Adds unit tests to verify correct emoji prefixes for different sources |
Comments suppressed due to low confidence (1)
test/log_entry_formatters_test.rb:39
- The test_console_formatter should be updated to verify that the source prefix is included in the formatted output. Since the @log_entry in setup doesn't specify a source, it defaults to 'manual' (per LogEntry initialization), so the test should assert that '✍️ ' appears in the formatted message. This would provide integration test coverage for the new feature.
def test_console_formatter
formatter = LogEntryFormatters::ConsoleFormatter.new(@known_people)
formatted_message = formatter.format(@log_entry)
assert_includes formatted_message, 'Alice Smith'
assert_includes formatted_message, 'Bob Johnson'
assert_includes formatted_message, 'PROJ-123'
end
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* Initial plan * Add YARD documentation to source_prefix method Co-authored-by: f-ewald <1391977+f-ewald@users.noreply.github.com> * Fix capitalization in YARD documentation Co-authored-by: f-ewald <1391977+f-ewald@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: f-ewald <1391977+f-ewald@users.noreply.github.com>
Contributor
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.
This change adds the octopus emoji for Github entries and the handwritten pencil emoji for manual entries to be able to distinguish the entries more easily visually.