Merge pull request 'update repo manager to work of master not main' (#22) from git-creation-issue into master
All checks were successful
Create Blog Article if new notes exist / prepare_blog_drafts_and_push (push) Successful in 19m8s
All checks were successful
Create Blog Article if new notes exist / prepare_blog_drafts_and_push (push) Successful in 19m8s
Reviewed-on: #22
This commit is contained in:
commit
1781a1dbf5
@ -42,7 +42,7 @@ class GitRepository:
|
||||
print(f"Cloning failed: {e}")
|
||||
return False
|
||||
|
||||
def fetch(self, remote_name="origin", ref_name="main"):
|
||||
def fetch(self, remote_name="origin", ref_name="master"):
|
||||
"""Fetch updates from a remote repository with authentication"""
|
||||
try:
|
||||
self.repo.remotes[remote_name].fetch(ref_name=ref_name)
|
||||
@ -51,7 +51,7 @@ class GitRepository:
|
||||
print(f"Fetching failed: {e}")
|
||||
return False
|
||||
|
||||
def pull(self, remote_name="origin", ref_name="main"):
|
||||
def pull(self, remote_name="origin", ref_name="master"):
|
||||
"""Pull updates from a remote repository with authentication"""
|
||||
print("Pulling Latest Updates (if any)")
|
||||
try:
|
||||
@ -93,8 +93,8 @@ class GitRepository:
|
||||
self.repo.git.checkout(title)
|
||||
self.pull(ref_name=title)
|
||||
else:
|
||||
# New branch, create from main
|
||||
self.repo.git.checkout("-b", title, "origin/main")
|
||||
# New branch, create from master
|
||||
self.repo.git.checkout("-b", title, "origin/master")
|
||||
|
||||
# Ensure destination directory exists
|
||||
dest_dir = f"{self.repo_path}src/content/"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user