Fix the /version subaction to not crash on missing pr-base-branch input (#666)

* use `getOptionalInput` consistently

* introduce `getRequiredInput`

* add changeset
This commit is contained in:
Mateusz Burzyński
2026-06-23 11:26:43 +00:00
committed by GitHub
parent ccb38113ea
commit dc29b738b5
7 changed files with 44 additions and 20 deletions
+6 -2
View File
@@ -3,7 +3,11 @@ import os from "node:os";
import path from "node:path";
import artifact from "@actions/artifact";
import * as core from "@actions/core";
import { downloadArtifact, execChangesetsCli } from "../utils.ts";
import {
downloadArtifact,
execChangesetsCli,
getOptionalInput,
} from "../utils.ts";
try {
await main();
@@ -12,7 +16,7 @@ try {
}
async function main() {
const publishPlanArtifactId = core.getInput("publish-plan-artifact-id");
const publishPlanArtifactId = getOptionalInput("publish-plan-artifact-id");
// If the user needs to change the cwd, set `working-directory` in the step instead
const cwd = process.cwd();