Skip to content

Fix PyGithub Auth.Token usage for newer API#56

Merged
hyperbolic2346 merged 3 commits intoNVIDIA:mainfrom
patilkishorv:main
Apr 7, 2026
Merged

Fix PyGithub Auth.Token usage for newer API#56
hyperbolic2346 merged 3 commits intoNVIDIA:mainfrom
patilkishorv:main

Conversation

@patilkishorv
Copy link
Copy Markdown
Contributor

Fixing
/signoff-check:34: DeprecationWarning: Argument login_or_token is deprecated, please use auth=github.Auth.Token(...) instead
Noticed during NVIDIA/spark-rapids#14531

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@patilkishorv patilkishorv requested a review from a team as a code owner April 6, 2026 16:10
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 6, 2026

Greptile Summary

This PR fixes a DeprecationWarning in PyGithub by replacing the deprecated positional login_or_token argument with the newer auth=Auth.Token(token) pattern, and adds the required Auth import. The copyright year is also updated to 2024-2026. The change is minimal, correct, and matches the PyGithub v2 migration guide.

Confidence Score: 5/5

Safe to merge — minimal, correct fix for a deprecation warning with no logic changes.

Single-file, two-line change that exactly follows the PyGithub v2 migration guide. No behavioral changes, no new risk introduced.

No files require special attention.

Important Files Changed

Filename Overview
signoff-check/signoff-check Replaces deprecated Github(token) positional arg with Github(auth=Auth.Token(token)); adds Auth import; updates copyright year.

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant Script as signoff-check
    participant PyGithub as PyGithub
    participant GHAPI as GitHub API

    GHA->>Script: Run with GITHUB_TOKEN
    Script->>PyGithub: Auth.Token(token)
    PyGithub-->>Script: auth object
    Script->>GHAPI: Github(auth=auth).get_repo().get_pull()
    GHAPI-->>Script: PR commits
    Script->>Script: Check SIGNOFF_REGEX
    Script-->>GHA: exit 0 (signoff found) / exit 1 (not found)
Loading

Reviews (4): Last reviewed commit: "Signing" | Re-trigger Greptile

Signed-off-by: Kishor Patil <kishorkumarp@nvidia.com>
Signed-off-by: Kishor Patil <kishorkumarp@nvidia.com>
@hyperbolic2346 hyperbolic2346 merged commit 3433d60 into NVIDIA:main Apr 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants