Open Kaligule opened 6 years ago
Seems simple enough to glue that ^^ service into gitfiti via the python requests library, want to give it a shot?
Though 1 request per commit might slow down the whole process quite a bit, maybe just grab 10-100 and repeat messages as needed.
How would you handle cases where you have more commits (think thousands) than messages?
I thought it would be more flexible to have a file locally, just like https://github.com/ngerakines/commitment/blob/master/commit_messages.txt That way a user could easily addopt it to what seems appropreate for him, there would be no additional traffic at all and we could still be superfast.
There are 3 message-strategies I can think of:
--commit-message="foo bar"
: Just have a default for every message--commit-message-rotate="path/to/file.txt"
: Use the lines in the file, one for each commit. Start over if you need more--commit-message-random="path/to/file.txt"
: Use a random line from the file every time.For backwards compatibility we could set --commit-message=""
to be the default.
What do you think?
A user set default message OR path to file seem fine to me, though having both rotate AND random seems like overkill but sure why not. It looks like that project is MIT licensed so we can just adopt those messages to start.
I will point out that currently no options can be passed in, so it would have to be wedged into the text prompts until #38 happens.
It would be nice to be able to provide a file with one potential commit message per line (or a directory with one potential commit message per file) from which the commits could randomly draw their messages.
https://github.com/ngerakines/commitment could be an inspiration.