This is an automated email from the ASF dual-hosted git repository.

kaxilnaik 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 bfa4a1bb504 Fix deprecated GitHub API authentication in airflow-github 
script (#56978)
bfa4a1bb504 is described below

commit bfa4a1bb504856ad7d5264aff9bfbd277ee20fdb
Author: Kaxil Naik <[email protected]>
AuthorDate: Tue Oct 21 21:23:14 2025 +0100

    Fix deprecated GitHub API authentication in airflow-github script (#56978)
    
    Replace deprecated login_or_token parameter with Auth.Token() to eliminate
    deprecation warnings when running the airflow-github compare command.
    
    Updates all three Github() instantiations in compare, changelog, and
    needs_categorization functions to use the new auth parameter.
---
 dev/airflow-github | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dev/airflow-github b/dev/airflow-github
index fd1765707fc..fbbc846b7be 100755
--- a/dev/airflow-github
+++ b/dev/airflow-github
@@ -39,7 +39,7 @@ from typing import TYPE_CHECKING
 
 import git
 import rich_click as click
-from github import Github
+from github import Auth, Github
 from packaging import version
 from rich.console import Console
 from rich.progress import Progress
@@ -309,7 +309,7 @@ def compare(target_version, github_token, 
previous_version=None, show_uncherrypi
 
     repo = git.Repo(".", search_parent_directories=True)
 
-    github_handler = Github(github_token)
+    github_handler = Github(auth=Auth.Token(github_token))
 
     # Fetch PRs and Issues separately, with merged PRs identified upfront
     merged_prs: list[Issue] = list(
@@ -469,7 +469,7 @@ def changelog(previous_version, target_version, 
github_token, disable_progress_b
     if disable_progress_bar:
         print(f"Processing {len(log)} commits")
 
-    gh = Github(github_token)
+    gh = Github(auth=Auth.Token(github_token))
     gh_repo = gh.get_repo("apache/airflow")
     sections = defaultdict(list)
     with open("RELEASE_NOTES.rst") as file:
@@ -509,7 +509,7 @@ def needs_categorization(previous_version, target_version, 
show_skipped, show_fi
     repo = git.Repo(".", search_parent_directories=True)
     log = get_commits_between(repo, previous_version, target_version)
 
-    gh = Github(github_token)
+    gh = Github(auth=Auth.Token(github_token))
     gh_repo = gh.get_repo("apache/airflow")
     for commit in log:
         tickets = pr_title_re.findall(commit["subject"])

Reply via email to