From ec486f8504a497ae93e1d5cfd5f4837ad4a3b4da Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 8 May 2023 21:14:06 -0700 Subject: [PATCH] Add commit message to new files added in set_repo() method. --- coder.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coder.py b/coder.py index 8a6a344b2..2dfc223fa 100755 --- a/coder.py +++ b/coder.py @@ -95,6 +95,9 @@ class Coder: if Confirm.ask(question, console=self.console): self.repo.git.add(relative_fname) 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: self.console.print(f"[red]Skipped adding {fname} to the git repo")