Skip to content

fix: distinguish error cases in list_refs#4

Merged
effigies merged 1 commit intomainfrom
fix/github-mirror-errors
Mar 30, 2026
Merged

fix: distinguish error cases in list_refs#4
effigies merged 1 commit intomainfrom
fix/github-mirror-errors

Conversation

@effigies
Copy link
Copy Markdown
Contributor

list_refs() now returns descriptive strings instead of None for error cases: "repo-not-found" when the remote repository doesn't exist, "repo-empty" when the repository exists but has no refs, and "command-failed" for other git ls-remote failures.

The stderr check scans for "fatal:" and "not found" to robustly identify missing repositories even when the remote sends additional diagnostic lines before the fatal message.

Breaking change, but will be shortly followed up by patches on the dashboard.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.85%. Comparing base (68cf92e) to head (f50d7ae).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #4   +/-   ##
=======================================
  Coverage   97.85%   97.85%           
=======================================
  Files          17       17           
  Lines        1260     1261    +1     
=======================================
+ Hits         1233     1234    +1     
  Misses         27       27           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

list_refs() now returns descriptive strings instead of None for error
cases: "repo-not-found" when the remote repository doesn't exist,
"repo-empty" when the repository exists but has no refs, and
"command-failed" for other git ls-remote failures.

The stderr check scans for "fatal:" and "not found" to robustly
identify missing repositories even when the remote sends additional
diagnostic lines before the fatal message.
@effigies effigies force-pushed the fix/github-mirror-errors branch from ee5a1d5 to f50d7ae Compare March 30, 2026 19:41
@effigies effigies merged commit ac26ec9 into main Mar 30, 2026
7 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.

1 participant