From 8a79482bde8f19fa48f630bc525faa24d4ddee39 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 3 Apr 2023 10:49:29 -0400 Subject: [PATCH] fix: Add check in release-tool for no relevant PRs Signed-off-by: Sebastian Malton --- packages/release-tool/src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/release-tool/src/index.ts b/packages/release-tool/src/index.ts index 9e30cf29a5..3b731cb7a0 100755 --- a/packages/release-tool/src/index.ts +++ b/packages/release-tool/src/index.ts @@ -316,6 +316,10 @@ async function cherryPickCommits(prs: ExtendedGithubPrData[]): Promise { } async function pickRelevantPrs(prs: ExtendedGithubPrData[], isMasterBranch: boolean): Promise { + if (prs.length === 0) { + throw new Error("Cannot pick relevant PRs for release if there are none. Are the milestones on github correct?"); + } + if (isMasterBranch) { return prs; }