From 7ff99e81069395022c1d9a5018ca6eada7280354 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 11 Jan 2022 20:12:39 +0100 Subject: [PATCH] Use correct URL property for token (#377) --- src/git.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/git.js b/src/git.js index c2e1e2b4..a67cb312 100644 --- a/src/git.js +++ b/src/git.js @@ -14,14 +14,14 @@ function checkOutRemoteBranch(context) { core.info(`Adding "${context.repository.forkName}" fork as remote with Git`); const cloneURl = new URL(context.repository.forkCloneUrl); cloneURl.username = context.actor; - cloneURl.username = context.token; + cloneURl.password = context.token; run(`git remote add fork ${cloneURl.toString()}`); } else { // No fork: Update remote URL to include auth information (so auto-fixes can be pushed) core.info(`Adding auth information to Git remote URL`); const cloneURl = new URL(context.repository.cloneUrl); cloneURl.username = context.actor; - cloneURl.username = context.token; + cloneURl.password = context.token; run(`git remote set-url origin ${cloneURl.toString()}`); }