Skip to content

Commit d2bc5a1

Browse files
committed
fix(github): fall through to commit author lookup when user search returns no results
resolveAuthorInfo was returning early with an empty login when the GitHub user search yielded zero items, so the commit-based fallback never ran. Invert the condition to only set the login when results are present and always continue to the next lookup strategy.
1 parent 8e688b4 commit d2bc5a1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/core/github.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,9 @@ export class GitHubClient {
371371
items?: Array<{ login: string }>;
372372
}>(`/search/users?q=${q}`);
373373

374-
if (!data.items || data.items.length === 0) {
375-
return info;
374+
if (data.items && data.items.length > 0) {
375+
info.login = data.items[0]!.login;
376376
}
377-
378-
info.login = data.items[0]!.login;
379377
} catch (err) {
380378
logger.warn(`Failed to resolve author info for email ${info.email}: ${formatUnknownError(err).message}`);
381379
}

0 commit comments

Comments
 (0)