Skip to content

Commit

Permalink
Revert CommitSelecteds rename
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Sep 11, 2020
1 parent 49aea4d commit 9fc8217
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/services/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ async function prompt<T = unknown>(options: Question) {
}

export async function promptForCommits({
CommitSelecteds,
commitChoices,
isMultipleChoice,
}: {
CommitSelecteds: Commit[];
commitChoices: Commit[];
isMultipleChoice: boolean;
}): Promise<Commit[]> {
const choices = CommitSelecteds.map((c, i) => {
const choices = commitChoices.map((c, i) => {
const existingPRs = c.existingTargetPullRequests
.map((item) => {
const styling = item.state === 'MERGED' ? chalk.green : chalk.gray;
Expand Down Expand Up @@ -54,7 +54,7 @@ export async function promptForCommits({

const selectedCommits = Array.isArray(res) ? res.reverse() : [res];
return isEmpty(selectedCommits)
? promptForCommits({ CommitSelecteds: CommitSelecteds, isMultipleChoice })
? promptForCommits({ commitChoices: commitChoices, isMultipleChoice })
: selectedCommits;
}

Expand Down
8 changes: 4 additions & 4 deletions src/ui/getCommits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ export async function getCommits(options: BackportOptions) {
}

if (options.prFilter) {
const CommitSelecteds = await fetchPullRequestBySearchQuery(options);
const commitChoices = await fetchPullRequestBySearchQuery(options);

return promptForCommits({
CommitSelecteds,
commitChoices,
isMultipleChoice: options.multipleCommits,
});
}

const CommitSelecteds = await fetchCommitsByAuthor(options);
const commitChoices = await fetchCommitsByAuthor(options);
return promptForCommits({
CommitSelecteds,
commitChoices,
isMultipleChoice: options.multipleCommits,
});
}

0 comments on commit 9fc8217

Please sign in to comment.