Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions amplifier_app_cli/utils/source_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ async def check_all_sources(
return UpdateReport(
local_file_sources=local_statuses,
cached_git_sources=git_statuses,

cached_modules_checked=cached_modules_checked,
)

Expand Down Expand Up @@ -481,8 +480,20 @@ async def _check_all_cached_modules(
)
)

except httpx.HTTPStatusError as e:
if e.response.status_code == 404:
# Private repos return 404 on unauthenticated Atom feed requests.
# Actionable: user can set GITHUB_TOKEN or run gh auth login.
logger.warning(
f"Skipping {module.module_id} "
f"(private repo or not found - set GITHUB_TOKEN or run "
f"gh auth login to enable update checks)"
)
else:
logger.warning(f"Could not check {module.module_id}: {e}")
continue
except (httpx.HTTPError, httpx.TimeoutException) as e:
# Network/API errors - log but continue checking other modules
# Network/timeout errors - log but continue checking other modules
logger.warning(f"Could not check {module.module_id}: {e}")
continue
except Exception as e:
Expand Down Expand Up @@ -536,10 +547,15 @@ async def _get_github_commit_sha(

owner, repo = parts[0], parts[1]

# Fetch Atom feed (public, no auth, no rate limits)
# Fetch Atom feed (no auth for public repos, retry with auth on 404)
atom_url = f"https://github.com/{owner}/{repo}/commits/{ref}.atom"

response = await client.get(atom_url)
if response.status_code == 404:
# May be a private repo - retry with auth if available
auth_headers = _get_github_auth_headers()
if auth_headers:
response = await client.get(atom_url, headers=auth_headers)
response.raise_for_status()

# Parse XML for first commit SHA
Expand Down