From 04368b7500fbf5f44d377b0d48e2252ffe6ccb43 Mon Sep 17 00:00:00 2001 From: Amogh Desai Date: Sun, 20 Oct 2024 23:51:05 +0530 Subject: [PATCH] Consider both commit authors and PR authors in status of testing issue (#43192) * Consider both commit authors and PR authors in status of testing issue * Consider both commit authors and PR authors in status of testing issue --- .../commands/release_management_commands.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 b5d3d5ab0481..bc7014c8c855 100644 --- a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py @@ -3476,6 +3476,22 @@ def generate_issue_content( continue pull_requests[pr_number] = pr + + # retrieve and append commit authors (to handle cherry picks) + if hasattr(pr, "get_commits"): + try: + commits = pr.get_commits() + for commit in commits: + author = commit.author + if author: + users[pr_number].add(author.login) + progress.console.print(f"Added commit author {author.login} for PR#{pr_number}") + + except Exception as e: + progress.console.print( + f"[warn]Could not retrieve commits for PR#{pr_number}: {e}, skipping[/]" + ) + # GitHub does not have linked issues in PR - but we quite rigorously add Fixes/Closes # Relate so we can find those from the body if pr.body: