Skip to content

On 401 for fetching GitHub Repos then retry without auth for public repos and emit error about incorrect GH Auth token #290

@kentbull

Description

@kentbull

When collectExternalReferences() is run with an invalid GITHUB_API_TOKEN, public GitHub Pages content still loads successfully, but the GitHub API branch lookup fails with 401, producing misleading errors like “Could not get commit hash from main branch”.

Expected:

  • If the repo is public, retry the branch lookup without auth after a 401, or
  • downgrade this to a warning that the token is invalid/stale, since term collection can still succeed.

Also, the warning text references GITHUB_PAT, while the code reads GITHUB_API_TOKEN.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions