From cabe73be1c62a591701944816358f5d9a2945fc1 Mon Sep 17 00:00:00 2001 From: Ephraim Anierobi Date: Fri, 28 Apr 2023 14:34:03 +0100 Subject: [PATCH] Some minor updates to the release command pygithub now requires to specify if a search is for pull request or issues and not both. Also, a fix on searching old rc versions after removing the asf svn repo --- dev/airflow-github | 9 ++++++++- .../airflow_breeze/commands/release_candidate_command.py | 5 ++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dev/airflow-github b/dev/airflow-github index 8f893d8c05477..28d6b7ba83cdf 100755 --- a/dev/airflow-github +++ b/dev/airflow-github @@ -230,7 +230,14 @@ def compare(target_version, github_token, previous_version=None, show_uncherrypi github_handler = Github(github_token) milestone_issues: list[Issue] = list( github_handler.search_issues( - f'repo:apache/airflow milestone:"Airflow {target_version}" is:pull-request is:issue' + f'repo:apache/airflow milestone:"Airflow {target_version}" is:pull-request ' + ) + ) + milestone_issues.extend( + list( + github_handler.search_issues( + f'repo:apache/airflow milestone:"Airflow {target_version}" is:issue ' + ) ) ) diff --git a/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py b/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py index 35e5405d9a98a..c05b067eefed3 100644 --- a/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py +++ b/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py @@ -164,6 +164,8 @@ def push_artifacts_to_asf_repo(version, repo_root): check=True, ) console_print("Files pushed to svn") + # Remove old releases + remove_old_releases(version, repo_root) os.chdir(repo_root) run_command(["rm", "-rf", "asf-dist"], dry_run_override=DRY_RUN, check=True) @@ -375,8 +377,5 @@ def publish_release_candidate(version, previous_version, github_token): os.chdir(airflow_repo_root) create_issue_for_testing(version, previous_version, github_token) - # Remove old releases - remove_old_releases(version, airflow_repo_root) - console_print() console_print("Done!")