Azure publish action always uses basic authentication when pushing to Git.

Signed-off-by: Matt Moore <matthew.moore3@tc.gc.ca>
This commit is contained in:
Matt Moore
2024-09-12 10:24:05 -04:00
parent 8fab338818
commit c9f7f5fd9a
@@ -207,13 +207,10 @@ export function createPublishAzureAction(options: {
: config.getOptionalString('scaffolder.defaultAuthor.email'),
};
const auth =
ctx.input.token || credentials?.type === 'pat'
? {
username: 'notempty',
password: ctx.input.token ?? credentials!.token,
}
: { token: credentials!.token };
const auth = {
username: 'notempty',
password: ctx.input.token ?? credentials!.token,
};
const commitResult = await initRepoAndPush({
dir: getRepoSourceDirectory(ctx.workspacePath, ctx.input.sourcePath),