Skip to content

Commit

Permalink
Update update_versions.py
Browse files Browse the repository at this point in the history
  • Loading branch information
duguankui committed Oct 5, 2023
1 parent 064f627 commit 58f63e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/update_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def create_pr():
repo = g.get_repo("dignite-projects/dignite-abp")

branch_name = f"update-latest-versions-{os.environ['GITHUB_REF'].split('/')[-1]}"
base = repo.get_branch("dev")
base = repo.get_branch("main")
repo.create_git_ref(ref=f"refs/heads/{branch_name}", sha=base.commit.sha)

# Get the current latest-versions.json file and its sha
contents = repo.get_contents("latest-versions.json", ref="dev")
contents = repo.get_contents("latest-versions.json", ref="main")
file_sha = contents.sha

# Update the file in the repo
Expand All @@ -42,7 +42,7 @@ def create_pr():
try:
pr = repo.create_pull(title="Update latest-versions.json",
body="Automated PR to update the latest-versions.json file.",
head=branch_name, base="dev")
head=branch_name, base="main")
except Exception as e:
print(f"Error while creating PR: {e}")

Expand Down

0 comments on commit 58f63e4

Please sign in to comment.