Simplify git onAuth calls

This commit is contained in:
Alex Gleason committed 2025-09-21 17:42:16 -05:00
1 parent bc907fdd63
commit 154b9330d4
4 files changed
+11 -47

No files matched your search

+2 -4
View File
@@ -31,9 +31,9 @@ export function extractGitOrigin(gitUrl: string): string | null {
export function findCredentialsForRepo(
repoUrl: string,
credentials: Record<string, GitCredential>
): GitCredential | null {
): GitCredential | undefined {
const repoOrigin = extractGitOrigin(repoUrl);
if (!repoOrigin) return null;
if (!repoOrigin) return;
// Direct match
if (credentials[repoOrigin]) {
@@ -57,8 +57,6 @@ export function findCredentialsForRepo(
return credential;
}
}
return null;
}
/**