Skip to content

Commit e7dfc5a

Browse files
authored
chore: rebuild action (#6)
* chore: rebuild action * chore: remove default base ref
1 parent 3ea292c commit e7dfc5a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ branding:
99
inputs:
1010
base-ref:
1111
description: 'Base ref to compare against (defaults to main or PR target)'
12-
required: true
13-
default: 'origin/main'
12+
required: false
1413
github-token:
1514
description: 'The GitHub token for authentication.'
1615
required: true

main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24147,7 +24147,7 @@ function getFileFromRef(ref, filePath, cwd2) {
2414724147
function getBaseRef() {
2414824148
const inputBaseRef = core.getInput("base-ref");
2414924149
if (inputBaseRef) {
24150-
return inputBaseRef;
24150+
return inputBaseRef.includes("/") ? inputBaseRef : `origin/${inputBaseRef}`;
2415124151
}
2415224152
const githubBaseRef = github.context.payload.pull_request?.base.ref;
2415324153
if (githubBaseRef) {

src/git.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export function getFileFromRef(
2222

2323
export function getBaseRef(): string {
2424
const inputBaseRef = core.getInput('base-ref');
25+
2526
if (inputBaseRef) {
2627
return inputBaseRef.includes('/') ? inputBaseRef : `origin/${inputBaseRef}`;
2728
}

0 commit comments

Comments
 (0)