This is an automated email from the ASF dual-hosted git repository. amoghdesai pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push: new 40aef0ad653 Ignore dependabot PRs while creating issue content for providers (#49355) 40aef0ad653 is described below commit 40aef0ad6535996460e8799e0333eccb9d49b72b Author: Amogh Desai <amoghrajesh1...@gmail.com> AuthorDate: Wed Apr 16 23:28:46 2025 +0530 Ignore dependabot PRs while creating issue content for providers (#49355) --- .../airflow_breeze/commands/release_management_commands.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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 2c638f03a0e..82a0c98cf68 100644 --- a/dev/breeze/src/airflow_breeze/commands/release_management_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/release_management_commands.py @@ -2469,14 +2469,23 @@ def generate_issue_content_providers( progress.console.print( f"Retrieving PR#{pr_number}: https://github.com/apache/airflow/pull/{pr_number}" ) + pr_or_issue = None try: - pull_requests[pr_number] = repo.get_pull(pr_number) + pr_or_issue = repo.get_pull(pr_number) + if pr_or_issue.user.login == "dependabot[bot]": + get_console().print( + f"[yellow]Skipping PR #{pr_number} as it was created by dependabot[/]" + ) + continue + pull_requests[pr_number] = pr_or_issue except UnknownObjectException: # Fallback to issue if PR not found try: - pull_requests[pr_number] = repo.get_issue(pr_number) # (same fields as PR) + pr_or_issue = repo.get_issue(pr_number) # type: ignore[assignment] except UnknownObjectException: get_console().print(f"[red]The PR #{pr_number} could not be found[/]") + pull_requests[pr_number] = pr_or_issue # type: ignore[assignment] + # Retrieve linked issues if pr_number in pull_requests and pull_requests[pr_number].body: body = " ".join(pull_requests[pr_number].body.splitlines())