mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Rename to kebab-case for root action inputs and outputs (#668)
* Rename to kebab-case for root action inputs and outputs * Throw on renamed inputs
This commit is contained in:
@@ -135,6 +135,16 @@ export function getRequiredInput(name: string) {
|
||||
return core.getInput(name, { required: true });
|
||||
}
|
||||
|
||||
export function throwOnRenamedInputs(renames: Record<string, string>) {
|
||||
for (const [oldInput, newInput] of Object.entries(renames)) {
|
||||
if (core.getInput(oldInput)) {
|
||||
throw new Error(
|
||||
`The input "${oldInput}" has been renamed to "${newInput}". Please update your workflow file.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function resolveChangesetsCli(cwd: string) {
|
||||
return require.resolve("@changesets/cli/bin.js", {
|
||||
paths: [cwd],
|
||||
|
||||
Reference in New Issue
Block a user