Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for costum commit messages #53

Open
Kaligule opened this issue Feb 19, 2018 · 3 comments
Open

Allow for costum commit messages #53

Kaligule opened this issue Feb 19, 2018 · 3 comments

Comments

@Kaligule
Copy link

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
Copy link
Owner

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
Copy link
Author

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?

@gelstudios
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants