Update release verification script to ignore draft PRs
@@ -189,12 +189,12 @@ def validate_tags_and_releases(repo_paths, lib_versions):
continue
# Check that a release exists with the same name as the version.
git_releases_resp = requests.get(f"{GITHUB_API_URL}/repos/{repo_path}/releases", headers=GITHUB_AUTH_HEADER)
- found_release_for_verison = False
+ found_release_for_version = False
for release in git_releases_resp.json():
if release["name"] == lib_versions[library] and release["tag_name"] == lib_versions[library]:
- found_release_for_verison = True
+ found_release_for_version = True
break
- if not found_release_for_verison:
+ if not found_release_for_version:
log_error(f"Could not find release {lib_versions[library]} for {repo_path}.")
# Check that a tag exists with the same name as the version.
git_tags_resp = requests.get(f"{GITHUB_API_URL}/repos/{repo_path}/tags", headers=GITHUB_AUTH_HEADER)
@@ -216,6 +216,7 @@ def validate_main_branch():
if len(git_resp.json()) == 0:
logging.warn("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}.")
