Skip to content

Conversation

@artem-y
Copy link
Owner

@artem-y artem-y commented Apr 28, 2024

In this PR:

  • moved the logic related to searching for issues and generating the commit message out into message_generator package
  • added tests for the core logic of MessageGenerator
  • refactored the config package, added interim commitConfigDTO struct for unmarshalling JSON:
    we don't need to have pointers in the CommitConfig after we detect all unset properties and replace them with default values, but the "" are valid values (except for the regex, but I'll work on that later)
  • abstracted file-reading calls to the os package with FileReading interface, created a simple FileReader facade to just execute the same calls, and added a FileReadingMock to be used in unit tests
  • added tests for the core logic of config creation, from file or default properties
  • updated Makefile to run all tests from all the packages on make test command
  • added unit testing workflow
  • updated README, moved LICENSE to the root of the repo to make it appear in the "License" tab

What's Next:

There's much more refactoring left to do and more tests to write, I might get back to it in the future. Maybe I'll also add some step for code coverage.
I also want to add a simpler installation script and more safe-guards against some edge cases where the config file has invalid input.

@artem-y artem-y added the enhancement New feature or request label Apr 28, 2024
@artem-y artem-y self-assigned this Apr 28, 2024
@artem-y artem-y changed the title Refactor and test core parts logic Refactor and test parts of core logic Apr 28, 2024
@artem-y artem-y merged commit e6980f4 into main Apr 28, 2024
@artem-y artem-y deleted the feat/refactor-and-cover-with-tests branch April 28, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants