Skip to content

Commit e397361

Browse files
committed
wip: try this one
1 parent b16a611 commit e397361

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24133,6 +24133,7 @@ var github = __toESM(require_github(), 1);
2413324133
import { execFileSync } from "child_process";
2413424134
function getFileFromRef(ref, filePath, cwd2) {
2413524135
try {
24136+
core.info(execFileSync("git", ["status"], { cwd: cwd2, stdio: "pipe", encoding: "utf8" }));
2413624137
const content = execFileSync("git", ["show", `${ref}:${filePath}`], {
2413724138
encoding: "utf8",
2413824139
cwd: cwd2,
@@ -24147,12 +24148,10 @@ function getFileFromRef(ref, filePath, cwd2) {
2414724148
function getBaseRef() {
2414824149
const inputBaseRef = core.getInput("base-ref");
2414924150
if (inputBaseRef) {
24150-
core.info("Found input base ref: " + inputBaseRef);
2415124151
return inputBaseRef.includes("/") ? inputBaseRef : `origin/${inputBaseRef}`;
2415224152
}
2415324153
const githubBaseRef = github.context.payload.pull_request?.base.ref;
2415424154
if (githubBaseRef) {
24155-
core.info("Found github base ref: " + githubBaseRef);
2415624155
return `origin/${githubBaseRef}`;
2415724156
}
2415824157
return "origin/main";

src/git.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export function getFileFromRef(
88
cwd: string
99
): string | null {
1010
try {
11+
core.info(execFileSync('git', ['status'], { cwd, stdio: 'pipe', encoding: 'utf8' }));
1112
const content = execFileSync('git', ['show', `${ref}:${filePath}`], {
1213
encoding: 'utf8',
1314
cwd,
@@ -24,14 +25,12 @@ export function getBaseRef(): string {
2425
const inputBaseRef = core.getInput('base-ref');
2526

2627
if (inputBaseRef) {
27-
core.info('Found input base ref: ' + inputBaseRef);
2828
return inputBaseRef.includes('/') ? inputBaseRef : `origin/${inputBaseRef}`;
2929
}
3030

3131
const githubBaseRef = github.context.payload.pull_request?.base.ref;
3232

3333
if (githubBaseRef) {
34-
core.info('Found github base ref: ' + githubBaseRef);
3534
return `origin/${githubBaseRef}`;
3635
}
3736

0 commit comments

Comments
 (0)