From 343f6d3acdd97b00e74b87afbea7c4bd8c76b925 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Wed, 4 Sep 2024 16:53:32 +0200 Subject: [PATCH] Fix issue generation failing after deleting a PR Seems that #41416 PR has been somehow (?) deleted and when we try to generate issue links for it, the issue generation fails (and it is not an issue as well). This change should workaround that by skipping the PR. --- .../src/airflow_breeze/commands/release_management_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py index e4ed68f4cd318..060ccafcd2f9e 100644 --- a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py @@ -2093,7 +2093,7 @@ class ProviderPRInfo(NamedTuple): except UnknownObjectException: get_console().print(f"[red]The PR #{pr_number} could not be found[/]") # Retrieve linked issues - if pull_requests[pr_number].body: + if pr_number in pull_requests and pull_requests[pr_number].body: body = " ".join(pull_requests[pr_number].body.splitlines()) linked_issue_numbers = { int(issue_match.group(1)) for issue_match in ISSUE_MATCH_IN_BODY.finditer(body)