Skip to content

Commit 597288a

Browse files
committed
WIP
1 parent 6d0e67d commit 597288a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.circleci/rebase-pr.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ async function _main() {
5959
console.log();
6060

6161
// Get the count of commits between the latest commit from origin and the common ancestor SHA.
62-
const commitCount = exec(`git rev-list --count origin/${refs.base.ref}...${refs.commonAncestorSha}`);
62+
const commitCount = exec(`git rev-list --count ${refs.base.remote}/${refs.base.ref}...${refs.commonAncestorSha}`);
6363
console.log(`Checking ${commitCount} commits for changes in the CircleCI config file.`);
6464

6565
// Check if the files changed between the latest commit from origin and the common ancestor SHA
6666
// includes the CircleCI config.
67-
const circleCIConfigChanged = exec(`git diff --name-only origin/${refs.base.ref} ${refs.commonAncestorSha} -- .circleci/config.yml`);
67+
const circleCIConfigChanged = exec(`git diff --name-only ${refs.base.remote}/${refs.base.ref} ${refs.commonAncestorSha} -- .circleci/config.yml`);
6868

6969
if (!!circleCIConfigChanged) {
7070
throw Error(`
@@ -86,7 +86,7 @@ async function _main() {
8686
console.log();
8787

8888
// Rebase the PR.
89-
exec(`git rebase origin/${refs.base.ref}`);
89+
exec(`git rebase ${refs.base.remote}/${refs.base.ref}`);
9090
console.log(`Rebased current branch onto ${refs.base.ref}.`);
9191
}
9292

0 commit comments

Comments
 (0)