gelstudios / gitfiti

abusing github commit history for the lulz
MIT License
8.07k stars 1.12k forks source link

Allow for costum commit messages #53

Open Kaligule opened 6 years ago

Kaligule commented 6 years ago

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.

gelstudios commented 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?

Kaligule commented 6 years ago

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:

For backwards compatibility we could set --commit-message="" to be the default.

What do you think?

gelstudios commented 6 years ago

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.