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
2 changes: 1 addition & 1 deletion src/api/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export interface IGit {
}

export interface TitleAndDescriptionProvider {
provideTitleAndDescription(context: { commitMessages: string[], patches: string[] | { patch: string, fileUri: string, previousFileUri?: string }[], issues?: { reference: string, content: string }[], template?: string }, token: CancellationToken): Promise<{ title: string, description?: string } | undefined>;
provideTitleAndDescription(context: { commitMessages: string[], patches: string[] | { patch: string, fileUri: string, previousFileUri?: string }[], issues?: { reference: string, content: string }[], template?: string, compareBranch?: string }, token: CancellationToken): Promise<{ title: string, description?: string } | undefined>;
}

export interface ReviewerComments {
Expand Down
2 changes: 1 addition & 1 deletion src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2106,7 +2106,7 @@ ${contents}

const tokenSource = new vscode.CancellationTokenSource();
const result = await provider.provider.provideTitleAndDescription(
{ commitMessages, patches, issues, template },
{ commitMessages, patches, issues, template, compareBranch: args.compareBranch },
tokenSource.token,
);

Expand Down
3 changes: 1 addition & 2 deletions src/github/createPRViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1232,8 +1232,7 @@ Don't forget to commit your template file to the repository so that it can be us
const template = await templatePromise;

const provider = this._folderRepositoryManager.getTitleAndDescriptionProvider(searchTerm);
const result = await provider?.provider.provideTitleAndDescription({ commitMessages, patches, issues, template }, token);

const result = await provider?.provider.provideTitleAndDescription({ commitMessages, patches, issues, template, compareBranch: this.model.compareBranch }, token);
if (provider) {
this.lastGeneratedTitleAndDescription = { ...result, providerTitle: provider.title };
/* __GDPR__
Expand Down
2 changes: 1 addition & 1 deletion src/github/pullRequestOverview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ export class PullRequestOverviewPanel extends IssueOverviewPanel<PullRequestMode
const templateContent = await this._folderRepositoryManager.getPullRequestTemplateBody(this._item.remote.owner);

const result = await provider.provider.provideTitleAndDescription(
{ commitMessages, patches, issues: [], template: templateContent },
{ commitMessages, patches, issues: [], template: templateContent, compareBranch: this._item.head?.ref },
this.generatingDescriptionCancellationToken.token
);

Expand Down
Loading