Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@ async function run() {
})
).data.workflow_runs;

const inputTagIndex = _.findIndex(completedDeploys, (workflowRun) => workflowRun.head_branch === inputTag);
if (inputTagIndex < 0) {
throw new Error(`No completed deploy found for input tag ${inputTag}`);
}

const priorTag = completedDeploys[inputTagIndex + 1].head_branch;
const priorTag = _.first(completedDeploys).head_branch;
console.log(`Looking for PRs deployed to ${deployEnv} between ${priorTag} and ${inputTag}`);
const prList = await GitUtils.getPullRequestsMergedBetween(priorTag, inputTag);
console.log(`Found the pull request list: ${prList}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@ async function run() {
})
).data.workflow_runs;

const inputTagIndex = _.findIndex(completedDeploys, (workflowRun) => workflowRun.head_branch === inputTag);
if (inputTagIndex < 0) {
throw new Error(`No completed deploy found for input tag ${inputTag}`);
}

const priorTag = completedDeploys[inputTagIndex + 1].head_branch;
const priorTag = _.first(completedDeploys).head_branch;
console.log(`Looking for PRs deployed to ${deployEnv} between ${priorTag} and ${inputTag}`);
const prList = await GitUtils.getPullRequestsMergedBetween(priorTag, inputTag);
console.log(`Found the pull request list: ${prList}`);
Expand Down