INNER CODE UNIT · Python
commit_and_update_branch
DmitryRyumin/ICCV-2023-25-Papers · code/markdown_to_json_parser.py:91
def commit_and_update_branch(g, repo, latest_commit, tree):
try:
committer = InputGitAuthor(
name=g.get_user().name,
email=g.get_user().email,
)
commit = repo.create_git_commit(
message=Config.COMMIT_MESSAGE,
tree=tree,
parents=[latest_commit],
committer=committer,
author=committer,
)
# Update the branch reference to the new commit
print(f"Old Branch SHA: {repo.get_branch(repo.default_branch).commit.sha}")
print(