Skip to content

Commit 66093e8

Browse files
authored
Merge pull request #10312 from tannewt/sync_adabot_cp_org
Fix cp.org release PR creation
2 parents 04b17e1 + 2015367 commit 66093e8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/build_board_info.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,14 @@ def create_pr(changes, updated, git_info, user):
173173
changes["new_release"], boards, languages
174174
)
175175

176+
# Sync main so that the fork has the same commit sha1
177+
sync_main = {"branch": "main"}
178+
response = github.post(
179+
"/repos/{}/circuitpython-org/merge-upstream".format(user), json=sync_main
180+
)
181+
if not response.ok:
182+
raise SystemExit(f"unable to sync main: {response.text}")
183+
176184
create_branch = {"ref": "refs/heads/" + branch_name, "sha": commit_sha}
177185
response = github.post("/repos/{}/circuitpython-org/git/refs".format(user), json=create_branch)
178186
if not response.ok and response.json()["message"] != "Reference already exists":

0 commit comments

Comments
 (0)