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.
Short summary
Add the
--no-input
argument so the app can be run with all input prompts surpassed, e.g., to prevent Github actions from crashing.More context
I want to use codebase-digest as part of my Github Actions pipelines.
I want it export digest as txt file, and it almost works. :)
The problematic part are your
input()
prompts, which currently cannot be disabled via arguments, so I added one.I also added a basic unit testing framework to make it easier to modularize and test code in the future.
Example Github Action
Once this PR is merged and released to production, I plan to create another one with example Github Action.
If you want to try it on your own, here's the example code:
Chores
This PR also creates very (very!) basic setup for unit testing. I assume this project will grow, so it would be nice to bring at least baseline for maintainability.
To run unit tests
/codebase-digest
directorypython -m unittest discover -s tests
This required adding one more dependency in requirements-dev.txt:
unittest