Skip to content

solean/git-commit-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-commit-gen

git-commit-gen is a fun tool that builds a markov model (using the fantastic markovify library) of a git repo's log and use it to generate commit messages. The more commits in a repo, the more real the generated messages seem.

Example outputs:

  • "Removed extraneous comments before code complete with functional tests to work in two stages."
  • "Began building out test case for testing values"
  • "Removed extra comma that broke some validation on submit"
  • "Updated and preliminary-ly working before some refactoring of the new procedure utility"
  • "Fixed two integration tests for query list"

Usage

command line:

python3 git_commit_gen.py --repo=~/my_project --author=satoshi@gmail.com --n=5

as a module:

from git_commit_gen import GitCommitGenerator

g = GitCommitGenerator('~/my_project', 'satoshi@gmail.com')
# Optional, otherwise it will build every time you call .generate()
g.build_model()
messages = g.generate(2)
for x in messages:
    print(x)

About

Generate fake git commits for any git repo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages