INNER CODE UNIT · Python
get_github_repository
DmitryRyumin/ICCV-2023-25-Papers · code/markdown_to_json_parser.py:74
def get_github_repository():
github_token = Config.GITHUB_TOKEN
if not github_token:
print("GitHub token not available. Exiting.")
return None, None
g = Github(github_token)
return g, g.get_user(Config.REPO_OWNER).get_repo(Config.REPO_NAME)
def update_branch_reference(repo, commit_sha):
try:
repo.get_git_ref(f"heads/{repo.default_branch}").edit(commit_sha)
except Exception as e:
print(f"Error updating branch reference: {e}")
def commit_and_update_branch(g, repo, latest_commit, tree):