in tools/release/release-verify.py [0:0]
def validate_main_branch():
"""
Verifies there are no pending PRs to the main branch.
"""
git_resp = requests.get(
f"{GITHUB_API_URL}/repos/{CSDK_ORG}/{CSDK_REPO}/pulls?base=main", headers=GITHUB_AUTH_HEADER
)
if len(git_resp.json()) == 0:
logging.warning("main branch does not exist in CSDK.")
for pr in git_resp.json():
if not pr["draft"]:
pr_url = pr["url"]
log_error(f"Pull request to main {pr_url}.")