mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-22 10:51:02 +01:00
18 lines
538 B
Python
18 lines
538 B
Python
# git/operations/push.py
|
|
|
|
import git
|
|
import logging
|
|
from .commit import commit_changes
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
def push_changes(repo_path, files, message):
|
|
try:
|
|
repo = git.Repo(repo_path)
|
|
commit_changes(repo_path, files, message)
|
|
origin = repo.remote(name='origin')
|
|
origin.push()
|
|
return True, "Successfully pushed changes."
|
|
except Exception as e:
|
|
logger.error(f"Error pushing changes: {str(e)}", exc_info=True)
|
|
return False, f"Error pushing changes: {str(e)}" |