Skip to content

Commit bc7d7ad

Browse files
Copilotalexr00
andauthored
Show owner/repo:branch in PR header instead of owner:branch (#8276)
* Initial plan * Initial plan for showing owner/repoName in PR header Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> * Update PR header to show owner/repoName:branch instead of owner:branch Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> * Revert unrelated change to vscode.proposed.chatParticipantAdditions.d.ts * Simplify PR header change to only modify display layer Instead of modifying GraphQL queries and utils, construct the owner/repo:branch format directly in the PR overview and activity bar view provider using existing owner, name, and ref properties from GitHubRef. Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> * Revert unrelated @types changes Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> * Fix repo name --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 811ae3d commit bc7d7ad

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/github/activityBarViewProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,10 @@ export class PullRequestViewProvider extends WebviewViewBase implements vscode.W
253253
state: pullRequest.state,
254254
isCurrentlyCheckedOut: isCurrentlyCheckedOut,
255255
isRemoteBaseDeleted: pullRequest.isRemoteBaseDeleted,
256-
base: pullRequest.base.label,
256+
base: `${pullRequest.base.owner}/${pullRequest.base.name}:${pullRequest.base.ref}`,
257257
isRemoteHeadDeleted: pullRequest.isRemoteHeadDeleted,
258258
isLocalHeadDeleted: !branchInfo,
259-
head: pullRequest.head?.label ?? '',
259+
head: pullRequest.head ? `${pullRequest.head.owner}/${pullRequest.head.name}:${pullRequest.head.ref}` : '',
260260
canEdit: canEdit,
261261
hasWritePermission,
262262
mergeable: pullRequest.item.mergeable,

src/github/pullRequestOverview.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ export class PullRequestOverviewPanel extends IssueOverviewPanel<PullRequestMode
318318
canRequestCopilotReview: copilotUser !== undefined && !isCopilotAlreadyReviewer,
319319
isCurrentlyCheckedOut: isCurrentlyCheckedOut,
320320
isRemoteBaseDeleted: pullRequest.isRemoteBaseDeleted,
321-
base: pullRequest.base.label,
321+
base: `${pullRequest.base.owner}/${pullRequest.remote.repositoryName}:${pullRequest.base.ref}`,
322322
isRemoteHeadDeleted: pullRequest.isRemoteHeadDeleted,
323323
isLocalHeadDeleted: !branchInfo,
324-
head: pullRequest.head?.label ?? '',
324+
head: pullRequest.head ? `${pullRequest.head.owner}/${pullRequest.remote.repositoryName}:${pullRequest.head.ref}` : '',
325325
repositoryDefaultBranch: defaultBranch,
326326
status: status[0],
327327
reviewRequirement: status[1],

0 commit comments

Comments
 (0)