From 30ebebd7e899d81f262709e66f642a69d4d7c47f Mon Sep 17 00:00:00 2001 From: garronej Date: Wed, 1 Dec 2021 22:47:13 +0100 Subject: [PATCH] update --- dist/index.js | 3 ++- src/is_package_json_version_upgraded.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index df9df41..8a99dc4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -12380,7 +12380,8 @@ exports.setOutput = outputHelper_1.setOutputFactory().setOutput; function action(_actionName, params, core) { return __awaiter(this, void 0, void 0, function* () { core.debug(JSON.stringify(params)); - const { owner, repo, branch, github_token } = params; + const { owner, repo, github_token } = params; + const branch = params.branch.split("/").reverse()[0]; const to_version = yield getPackageJsonVersion({ owner, repo, branch }); if (to_version === undefined) { throw new Error(`No version in package.json on ${owner}/${repo}#${branch} (or repo is private)`); diff --git a/src/is_package_json_version_upgraded.ts b/src/is_package_json_version_upgraded.ts index cc45b00..c610fd0 100644 --- a/src/is_package_json_version_upgraded.ts +++ b/src/is_package_json_version_upgraded.ts @@ -32,7 +32,9 @@ export async function action( core.debug(JSON.stringify(params)); - const { owner, repo, branch, github_token } = params; + const { owner, repo, github_token } = params; + + const branch = params.branch.split("/").reverse()[0]; const to_version = await getPackageJsonVersion({ owner, repo, branch });