Skip to content

Commit

Permalink
Use correct URL property for token (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocean90 authored Jan 11, 2022
1 parent 008a9f8 commit 7ff99e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()}`);
}

Expand Down

0 comments on commit 7ff99e8

Please sign in to comment.