Skip to content

After using the repo_create_pull_request tool, the LLM often displays an incorrect project in the pull request URL #784

@Meir017

Description

@Meir017

For example:

My repository is in the msazure/MCAS project, however the LLM often uses the One project (probably due to it being a very common one)

Image Image

I think that adding the project name to the response would solve this.

function trimPullRequest(pr: GitPullRequest, includeDescription = false) {
return {
pullRequestId: pr.pullRequestId,
codeReviewId: pr.codeReviewId,
repository: pr.repository?.name,
status: pr.status,
createdBy: {
displayName: pr.createdBy?.displayName,
uniqueName: pr.createdBy?.uniqueName,
},
creationDate: pr.creationDate,
closedDate: pr.closedDate,
title: pr.title,
...(includeDescription ? { description: pr.description ?? "" } : {}),
isDraft: pr.isDraft,
sourceRefName: pr.sourceRefName,
targetRefName: pr.targetRefName,
};
}

adding

function trimPullRequest(pr: GitPullRequest, includeDescription = false) {
  return {
    pullRequestId: pr.pullRequestId,
+   project: pr.repository?.project?.name,
    codeReviewId: pr.codeReviewId,
    repository: pr.repository?.name,

Metadata

Metadata

Assignees

Labels

Needs Review 👓needs review by the product teamRepos 📁issue in the repos area

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions