Repository navigation
Fail profile readme instead of writing it without a table when the org listing fails [patch] - #234
Open
matt-edmondson wants to merge 1 commit into
Open
matt-edmondson wants to merge 1 commit into
matt-edmondson wants to merge 1 commit into
Conversation
…g listing fails [patch]
A failed /orgs/{org}/repos page used to end the listing early, so a
transient 5xx or rate limit on page 1 produced an empty list, and the
generator wrote and the daily job committed a profile README with no
repository table. A failure on a later page produced a truncated one.
ListOrganizationRepositoriesAsync now throws when any page fails, and
GenerateAsync refuses an empty listing before writing anything, so the
command exits 1 and the existing README stays as it was.
Fixes #178
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012hoj76iUqCE6J1Wp5Dgmbm
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #178
What changed
GitHubApiClient.ListOrganizationRepositoriesAsyncnow throwsInvalidOperationException(naming the page) when any page of/orgs/{org}/reposfails or can't be read. Before, itbreaked and returned what it had:[]if page 1 failed, a truncated list if a later page did. All other calls still degrade to no data, because a single repository's lookup failing is acceptable (GitHub API failures are indistinguishable from "no data," silently dropping repos from the profile #140). The interface documents the new exception.ProfileGenerator.CheckTemplateLinksAsyncused to log "Could not list the organization…" on an empty listing and let the run write a README with no table. It now throws before anything is written.ProfileCommandalready maps exceptions to exit code 1, so the dailyupdate-readme.ymljob fails instead of committing a blank profile table.Tests
ListOrganizationRepositoriesAsync_WithAFailedFirstPage_Throws: an HTTP 502 on page 1 throws.ListOrganizationRepositoriesAsync_WithAFailedLaterPage_ThrowsRatherThanReturningAPartialList: a full page 1 followed by an unreadable page 2 throws and names page 2.GenerateAsync_WithAnEmptyListing_FailsAndLeavesTheReadmeUntouchedreplacesGenerateAsync_WithAnEmptyListing_WritesRatherThanBlockingOnAFailedLookup, as the issue asked. An existingREADME.mdkeeps its contents.GenerateAsync_WithAFailedListing_FailsAndLeavesTheReadmeUntouched: a guard for the throwing-client path.GetJson_WithUnparseableResponse_DegradesToEmptynow usesListReleasesAsync, so it still covers the generic degrade behaviour.KtsuBuild.Testssuite passes (786/786) andKtsuBuild.slnxbuilds clean.🤖 Generated with Claude Code
https://claude.ai/code/session_012hoj76iUqCE6J1Wp5Dgmbm
Generated by Claude Code