Pass onAuth into the git constructor instead of to push method

This commit is contained in:
Alex Gleason committed 2025-12-22 21:16:18 -06:00
1 parent a915b9121f
commit 3eb156e983
6 files changed
+19 -37

No files matched your search

@@ -64,15 +64,6 @@ export function ConfigureRepoStep({
dir,
remote: 'origin',
ref: gitStatus?.currentBranch || 'main',
onAuth: () => {
if (selectedProvider.credential) {
return {
username: selectedProvider.credential.username,
password: selectedProvider.credential.password,
};
}
return undefined;
},
});
}
@@ -41,15 +41,6 @@ export function SyncStep({ projectId }: StepProps) {
dir,
ref: gitStatus?.currentBranch || 'main',
singleBranch: true,
onAuth: () => {
if (matchedCredential) {
return {
username: matchedCredential.username,
password: matchedCredential.password,
};
}
return undefined;
},
});
} catch (err) {
const message = err instanceof Error ? err.message : 'Failed to pull';
@@ -72,15 +63,6 @@ export function SyncStep({ projectId }: StepProps) {
dir,
remote: 'origin',
ref: gitStatus?.currentBranch || 'main',
onAuth: () => {
if (matchedCredential) {
return {
username: matchedCredential.username,
password: matchedCredential.password,
};
}
return undefined;
},
});
} catch (err) {
const message = err instanceof Error ? err.message : 'Failed to push';