Skip to content

Commit

Permalink
Fix ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Jul 25, 2024
1 parent 9bb7ba3 commit 64b98b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ async function run() {
lastSuccessfulDeploy = completedDeploys.shift();
}

if (!lastSuccessfulDeploy) {
throw new Error('Could not find a prior successful deploy');
}

const priorTag = lastSuccessfulDeploy.head_branch;
console.log(`Looking for PRs deployed to ${deployEnv} between ${priorTag} and ${inputTag}`);
const prList = await GitUtils.getPullRequestsMergedBetween(priorTag ?? '', inputTag);
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11532,6 +11532,9 @@ async function run() {
console.log(`Deploy was not a success: ${lastSuccessfulDeploy.html_url}, looking at the next one`);
lastSuccessfulDeploy = completedDeploys.shift();
}
if (!lastSuccessfulDeploy) {
throw new Error('Could not find a prior successful deploy');
}
const priorTag = lastSuccessfulDeploy.head_branch;
console.log(`Looking for PRs deployed to ${deployEnv} between ${priorTag} and ${inputTag}`);
const prList = await GitUtils_1.default.getPullRequestsMergedBetween(priorTag ?? '', inputTag);
Expand Down

0 comments on commit 64b98b9

Please sign in to comment.