Skip to content

Commit

Permalink
fix: add more debugging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Oct 8, 2019
1 parent 673b875 commit a99cd41
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,19 @@ async function checkOutRemoteBranch(branch) {
return true;
}

core.debug(`fetching "${branch}" branch from remote`);
await command(
`git fetch https://x-access-token:${process.env.GITHUB_TOKEN}@github.com/${process.env.GITHUB_REPOSITORY}.git ${branch}:${branch}`,
{ shell: true }
);

core.debug(`Checking out "${branch}" branch locally`);
await command(`git checkout ${branch}`, { shell: true });
core.info(`Remote branch "${branch}" checked out locally.`);

core.debug(
`Rebasing "${branch}" locally using "git rebase -Xtheirs --autostash -"`
);
await command(`git rebase -Xtheirs --autostash -`, { shell: true });
return true;
} catch (error) {
Expand Down

0 comments on commit a99cd41

Please sign in to comment.