Skip to content

Commit

Permalink
Fix issue generation failing after deleting a PR (#42001)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
potiuk committed Sep 4, 2024
1 parent bfbff66 commit d5467d6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d5467d6

Please sign in to comment.