@@ -291,7 +291,7 @@ enum Ingestion {
291291 // https://github.com/swiftlang/swift/issues/76169
292292 assert ( false , " Unexpected error type: \( type ( of: error) ) " )
293293 // We need to throw _something_ here (we should never hit this codepath though)
294- throw Github . Error. requestFailed ( . internalServerError )
294+ throw Github . Error. unexpectedError ( error )
295295 // We could theoretically avoid this whole second catch and just do
296296 // error as! GithubError
297297 // but let's play it safe and not risk a server crash, unlikely as it may be.
@@ -333,27 +333,31 @@ enum Ingestion {
333333 repository. defaultBranch = repoMetadata. defaultBranch
334334 repository. forks = repoMetadata. forkCount
335335 repository. fundingLinks = repoMetadata. fundingLinks? . compactMap ( FundingLink . init ( from: ) ) ?? [ ]
336- repository. hasSPIBadge = readmeInfo? . containsSPIBadge ( )
337336 repository. homepageUrl = repoMetadata. homepageUrl? . trimmed
338337 repository. isArchived = repoMetadata. isArchived
339338 repository. isInOrganization = repoMetadata. isInOrganization
340339 repository. keywords = Set ( repoMetadata. topics. map { $0. lowercased ( ) } ) . sorted ( )
341340 repository. lastIssueClosedAt = repoMetadata. lastIssueClosedAt
342341 repository. lastPullRequestClosedAt = repoMetadata. lastPullRequestClosedAt
343342 repository. license = . init( from: repoMetadata. licenseInfo)
344- repository. licenseUrl = licenseInfo? . htmlUrl
345343 repository. name = repoMetadata. repositoryName
346344 repository. openIssues = repoMetadata. openIssues. totalCount
347345 repository. openPullRequests = repoMetadata. openPullRequests. totalCount
348346 repository. owner = repoMetadata. repositoryOwner
349347 repository. ownerName = repoMetadata. owner. name
350348 repository. ownerAvatarUrl = repoMetadata. owner. avatarUrl
351349 repository. s3Readme = s3Readme
352- repository. readmeHtmlUrl = readmeInfo? . htmlUrl
353350 repository. releases = repoMetadata. releases. nodes. map ( Release . init ( from: ) )
354351 repository. stars = repoMetadata. stargazerCount
355352 repository. summary = repoMetadata. description
356353 repository. forkedFrom = fork
354+ if let readmeInfo {
355+ repository. hasSPIBadge = readmeInfo. containsSPIBadge ( )
356+ repository. readmeHtmlUrl = readmeInfo. htmlUrl
357+ }
358+ if let licenseInfo {
359+ repository. licenseUrl = licenseInfo. htmlUrl
360+ }
357361
358362 do {
359363 try await repository. save ( on: database)
0 commit comments