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
10 changes: 4 additions & 6 deletions packages/das/src/webhook/github-fetcher.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,9 @@ export class GitHubFetcherService implements OnModuleInit {

// 3. Fetch file contents in batches (base + head in one GraphQL call each)
if (!pr.headSha) {
this.logger.warn(
`PR ${repoFullName}#${prNumber} has no head SHA — skipping content fetch`,
throw new Error(
`PR ${repoFullName}#${prNumber} has no head SHA; cannot fetch content`,
);
return;
}

// Prefer merge-base SHA (true common ancestor) over base SHA for
Expand Down Expand Up @@ -507,10 +506,9 @@ export class GitHubFetcherService implements OnModuleInit {
batchSize = newSize;
// Retry same i with smaller batch
} else {
this.logger.warn(
`GraphQL content batch failed at min size ${minBatchSize}: ${err}. Skipping batch.`,
throw new Error(
`GraphQL content batch failed at min size ${minBatchSize}: ${err}`,
);
i += batch.length;
}
}
}
Expand Down
Loading