Skip to content

Commit

Permalink
Fix merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 committed Dec 6, 2022
1 parent d1d5f62 commit c3cd8ed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cml.js
Original file line number Diff line number Diff line change
Expand Up @@ -586,20 +586,20 @@ class CML {

if (url) return renderPr(url);
} else {
await exec(`git checkout -b ${source}`);
await exec(`git fetch ${remote} ${sha}`);
await exec(`git checkout -B ${target} ${sha}`);
await exec('git', 'fetch', remote, sha);
await exec('git', 'checkout', '-b', source);
await exec('git', 'checkout', '-B', target, sha);

if (paths.length) {
await exec(`git add ${paths.join(' ')}`);
await exec('git', 'add', paths.join(' '));
let commitMessage = message || `CML PR for ${shaShort}`;
if (skipCi || (!message && !(merge || rebase || squash))) {
commitMessage += ' [skip ci]';
}
await exec(`git commit -m "${commitMessage}"`);
await exec('git', 'commit', '-m', commitMessage);
}

await exec(`git push --set-upstream ${remote} ${source}`);
await exec('git', 'push', '--set-upstream', remote, source);
}

const url = await driver.prCreate({
Expand Down

2 comments on commit c3cd8ed

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test Comment

Please sign in to comment.