Add commit message to new files added in set_repo() method.

This commit is contained in:
Paul Gauthier 2023-05-08 21:14:06 -07:00
parent 6781584d67
commit ec486f8504

View file

@ -95,6 +95,9 @@ class Coder:
if Confirm.ask(question, console=self.console): if Confirm.ask(question, console=self.console):
self.repo.git.add(relative_fname) self.repo.git.add(relative_fname)
self.console.print(f"[red]Added {fname} to the git repo") self.console.print(f"[red]Added {fname} to the git repo")
commit_message = f"Initial commit: Added {fname} to the git repo."
self.repo.git.commit("-m", commit_message, "--no-verify")
self.console.print(f"[green bold]Committed {fname} with message: {commit_message}")
else: else:
self.console.print(f"[red]Skipped adding {fname} to the git repo") self.console.print(f"[red]Skipped adding {fname} to the git repo")