mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Pass onAuth into the git constructor instead of to push method
This commit is contained in:
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';
|
||||
|
||||
Reference in new issue
Block a user