Skip to content

Commit 213c234

Browse files
authored
refactor: Move 'clean' script call to target branch (#129)
1 parent 98b0edc commit 213c234

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/index.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ async function run(octokit, context, token) {
8989
}
9090
}
9191

92+
const cleanScript = getInput('clean-script');
93+
if (cleanScript) {
94+
startGroup(`[target] Cleanup via ${packageManager} run ${cleanScript}`);
95+
await exec(`${packageManager} run ${cleanScript}`);
96+
endGroup();
97+
}
98+
9299
console.log('checking out and building base commit');
93100
try {
94101
if (!baseRef) throw Error('missing context.payload.base.ref');
@@ -98,12 +105,6 @@ async function run(octokit, context, token) {
98105
}
99106
endGroup();
100107

101-
const cleanScript = getInput('clean-script');
102-
if (cleanScript) {
103-
startGroup(`[base] Cleanup via ${packageManager} run ${cleanScript}`);
104-
await exec(`${packageManager} run ${cleanScript}`);
105-
endGroup();
106-
}
107108

108109
startGroup(`[base] Install Dependencies`);
109110

0 commit comments

Comments
 (0)