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

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new eae5ab2389 GH-50532: [R][CI] R nightly binary upload broken since 
github3 to pygithub migration (#50533)
eae5ab2389 is described below

commit eae5ab238987dae1293d977d34666155dfe6448b
Author: Nic Crane <[email protected]>
AuthorDate: Mon Jul 20 04:32:40 2026 -0400

    GH-50532: [R][CI] R nightly binary upload broken since github3 to pygithub 
migration (#50533)
    
    ### Rationale for this change
    
    #48886 replaced github3 with pygithub in archery. Unlike github3, 
pygithub's `Auth.Token` requires a non-None string, so `_github_login()` 
crashes when no token is provided. The `r_nightly.yml` workflow doesn't pass 
`CROSSBOW_GITHUB_TOKEN` to archery, so it has been failing since June 19 
(#50532). No R nightly binaries have been uploaded for a month.
    
    ### What changes are included in this PR?
    
    Fall back to unauthenticated `Github()` when no token is provided, 
restoring the pre-migration behavior. The crossbow repo is public so auth isn't 
required for downloading artifacts.
    
    ### Are these changes tested?
    
    Tested locally by running `archery crossbow download-artifacts` without a 
token set.
    
    ### Are there any user-facing changes?
    
    No.
    
    * GitHub Issue: #50532
    
    Authored-by: Nic Crane <[email protected]>
    Signed-off-by: Raúl Cumplido <[email protected]>
---
 dev/archery/archery/crossbow/core.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dev/archery/archery/crossbow/core.py 
b/dev/archery/archery/crossbow/core.py
index 0a9d1bd5d3..e88a08445c 100644
--- a/dev/archery/archery/crossbow/core.py
+++ b/dev/archery/archery/crossbow/core.py
@@ -448,10 +448,12 @@ class Repo:
         return blob.data
 
     def _github_login(self, github_token=None):
-        """Returns a logged in Github instance using PyGithub"""
+        """Returns a Github instance, optionally authenticated with a token"""
         if not _have_github:
             raise ImportError('Must install PyGithub')
         github_token = github_token or self.github_token
+        if not github_token:
+            return Github(timeout=30)
         return Github(auth=GithubAuth.Token(github_token), timeout=30)
 
     def as_github_repo(self, github_token=None):

Reply via email to