Skip to content

Commit a56db08

Browse files
Copilotalexr00
andcommitted
Address code review feedback: fix typo and add missing type definition
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 045c75c commit a56db08

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/github/createPRViewProvider.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export abstract class BaseCreatePullRequestViewProvider<T extends BasePullReques
218218
}
219219
commands.setContext(contexts.CREATE_PR_PERMISSIONS, viewerPermission);
220220

221-
const useCopilot: boolean = !!this.getTitleAndDescriptionProvider('Copilot') && (vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE).get<'commit' | 'template' | 'none' | 'Copilot'>(PULL_REQUEST_DESCRIPTION) === 'Copilot');
221+
const useCopilot: boolean = !!this.getTitleAndDescriptionProvider('Copilot') && (vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE).get<'commit' | 'template' | 'branchName' | 'none' | 'Copilot'>(PULL_REQUEST_DESCRIPTION) === 'Copilot');
222222
const defaultTitleAndDescriptionProvider = this.getTitleAndDescriptionProvider()?.title;
223223
if (defaultTitleAndDescriptionProvider) {
224224
/* __GDPR__
@@ -682,13 +682,13 @@ export class CreatePullRequestViewProvider extends BaseCreatePullRequestViewProv
682682
protected async getTitleAndDescription(compareBranch: Branch, baseBranch: string): Promise<{ title: string, description: string }> {
683683
let title: string = '';
684684
let description: string = '';
685-
const descrptionSource = vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE).get<'commit' | 'template' | 'branchName' | 'none' | 'Copilot'>(PULL_REQUEST_DESCRIPTION);
686-
if (descrptionSource === 'none') {
685+
const descriptionSource = vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE).get<'commit' | 'template' | 'branchName' | 'none' | 'Copilot'>(PULL_REQUEST_DESCRIPTION);
686+
if (descriptionSource === 'none') {
687687
return { title, description };
688688
}
689689

690690
// If branchName is selected, use the branch name as the title
691-
if (descrptionSource === 'branchName') {
691+
if (descriptionSource === 'branchName') {
692692
const name = compareBranch.name;
693693
if (name) {
694694
title = `${name.charAt(0).toUpperCase()}${name.slice(1)}`;
@@ -708,7 +708,7 @@ export class CreatePullRequestViewProvider extends BaseCreatePullRequestViewProv
708708
const [totalCommits, lastCommit, pullRequestTemplate] = await Promise.all([
709709
this.getTotalGitHubCommits(compareBranch, baseBranch),
710710
name ? titleAndBodyFrom(promiseWithTimeout(this._folderRepositoryManager.getTipCommitMessage(name), 5000)) : undefined,
711-
descrptionSource === 'template' ? this.getPullRequestTemplate() : undefined
711+
descriptionSource === 'template' ? this.getPullRequestTemplate() : undefined
712712
]);
713713
const totalNonMergeCommits = totalCommits?.filter(commit => commit.parents.length < 2);
714714

0 commit comments

Comments
 (0)