Skip to content

Commit edc77b7

Browse files
committed
Handle origin in branch name
1 parent 236d21a commit edc77b7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/processors.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ import type { Range } from "./Range";
1313
if (process.env.CI !== undefined) {
1414
const branch = process.env.ESLINT_PLUGIN_DIFF_COMMIT ?? guessBranch();
1515
if (branch !== undefined) {
16-
process.env.ESLINT_PLUGIN_DIFF_COMMIT = branch;
17-
fetchFromOrigin(branch);
16+
const branchWithoutOrigin = branch.replace(/^origin\//, "");
17+
const branchWithOrigin = `origin/${branchWithoutOrigin}`;
18+
fetchFromOrigin(branchWithoutOrigin);
19+
process.env.ESLINT_PLUGIN_DIFF_COMMIT = branchWithOrigin;
1820
}
1921
}
2022

0 commit comments

Comments
 (0)