From 7c724d8177f72fbb236d7012a9c998d4ea521808 Mon Sep 17 00:00:00 2001 From: armistace Date: Fri, 30 May 2025 16:36:18 +1000 Subject: [PATCH] merge conflict fixing finalisation --- src/main.py | 1 - src/repo_management/repo_manager.py | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.py b/src/main.py index 2e99a38..07817fc 100644 --- a/src/main.py +++ b/src/main.py @@ -32,4 +32,3 @@ for note in tril_notes: git_pass = os.environ["GIT_PASS"] repo_manager = git_repo.GitRepository("blog/", git_user, git_pass) repo_manager.create_copy_commit_push(blog_path, os_friendly_title, commit_message) - ai_gen.save_to_file(f"/blog_creator/generated_files/{os_friendly_title}.md") diff --git a/src/repo_management/repo_manager.py b/src/repo_management/repo_manager.py index f1dd1ac..3ebbd0f 100644 --- a/src/repo_management/repo_manager.py +++ b/src/repo_management/repo_manager.py @@ -24,6 +24,7 @@ class GitRepository: if os.path.exists(repo_path): shutil.rmtree(repo_path) self.repo_path = repo_path + print("Cloning Repo") Repo.clone_from(remote, repo_path) self.repo = Repo(repo_path) self.username = username @@ -49,6 +50,7 @@ class GitRepository: def pull(self, remote_name='origin', ref_name='main'): """Pull updates from a remote repository with authentication""" + print("Pulling Latest Updates (if any)") try: self.repo.remotes[remote_name].pull(ref_name) return True @@ -64,6 +66,7 @@ class GitRepository: def create_and_switch_branch(self, branch_name, remote_name='origin', ref_name='main'): """Create a new branch in the repository with authentication.""" try: + pring(f"Creating Branch {title}") # Use the same remote and ref as before self.repo.git.branch(branch_name) except GitCommandError: @@ -74,6 +77,7 @@ class GitRepository: def add_and_commit(self, message=None): """Add and commit changes to the repository.""" try: + print("Commiting latest draft") # Add all changes self.repo.git.add(all=True) # Commit with the provided message or a default