Skip to content

Commit 1ebb53a

Browse files
committed
Dist 2
1 parent 9483575 commit 1ebb53a

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

dist/index.js

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ const run = async (): Promise<void> => {
66
try {
77
// Get Inputs
88
const prefix = getInput('prefix', { required: false })
9-
const from = getInput('from', { required: true })
10-
const to = getInput('to', { required: true })
11-
const workingDirectory = getInput('working-directory', { required: true })
9+
const extractPrefix = getInput('extract-prefix', { required: false })
10+
const from = getInput('from', { required: false })
11+
const to = getInput('to', { required: false })
12+
const workingDirectory = getInput('working-directory', { required: false })
1213

1314
debug(`Inputs: ${JSON.stringify({ prefix, from, to, workingDirectory })}`)
1415

@@ -23,7 +24,9 @@ const run = async (): Promise<void> => {
2324
debug(`Output from Turborepo: ${json}`)
2425

2526
const parsedOutput = JSON.parse(json)
26-
const changedPackages = parsedOutput.packages.filter((p: string) => !prefix || p.startsWith(prefix));
27+
const changedPackages = parsedOutput.packages.filter(
28+
(p: string) => !prefix || p.startsWith(prefix)
29+
).map((p: string) => extractPrefix ? p.replace(prefix, "") : p);
2730

2831
setOutput('changed', changedPackages)
2932
} catch (error) {

0 commit comments

Comments
 (0)