From 1d35a10e6730ac0cf9fbe731f2996fd4b773ff7c Mon Sep 17 00:00:00 2001 From: Matthew Scharley Date: Fri, 15 Mar 2024 11:57:04 +1100 Subject: [PATCH] fix: minor derp with barrier conditions --- dist/index.js | 4 ++-- src/main.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 22399aa..39a01ab 100644 --- a/dist/index.js +++ b/dist/index.js @@ -31462,8 +31462,8 @@ async function run() { throw new Error('Unable to determine the owner of this repo.'); } const commits = await (0, getCommitLog_1.getCommitLog)(octokit, owner, repo, pr); - if (commits.length > 0) { - (0, debugJson_1.debugJson)('Refusing to update a PR with multiple commits', commits); + if (commits.length > 1) { + (0, debugJson_1.debugJson)('Refusing to update a PR with more than one commit', commits); return; } (0, core_1.debug)(`Writing changesets to ${input.changesetFolder}`); diff --git a/src/main.ts b/src/main.ts index 3e6263a..8287359 100644 --- a/src/main.ts +++ b/src/main.ts @@ -32,8 +32,8 @@ export async function run(): Promise { } const commits = await getCommitLog(octokit, owner, repo, pr); - if (commits.length > 0) { - debugJson('Refusing to update a PR with multiple commits', commits); + if (commits.length > 1) { + debugJson('Refusing to update a PR with more than one commit', commits); return; } debug(`Writing changesets to ${input.changesetFolder}`);