diff --git a/package.json b/package.json index 8786b962..178add84 100644 --- a/package.json +++ b/package.json @@ -578,7 +578,7 @@ ], "github-pull-request": [ { - "id": "github:createPullRequest", + "id": "github:createPullRequestWebview", "type": "webview", "name": "%view.github.create.pull.request.name%", "when": "github:createPullRequest", @@ -586,12 +586,19 @@ "initialSize": 2 }, { - "id": "github:compareChanges", + "id": "github:compareChangesFiles", "name": "%view.github.compare.changes.name%", "when": "github:createPullRequest", "visibility": "visible", "initialSize": 1 }, + { + "id": "github:compareChangesCommits", + "name": "%view.github.compare.changesCommits.name%", + "when": "github:createPullRequest", + "visibility": "visible", + "initialSize": 1 + }, { "id": "prStatus:github", "name": "%view.pr.status.github.name%", @@ -1801,22 +1808,22 @@ }, { "command": "pr.addAssigneesToNewPr", - "when": "view == github:createPullRequest && github:createPrPermissions != READ && github:createPrPermissions && config.githubPullRequests.experimental.createView", + "when": "view == github:createPullRequestWebview && github:createPrPermissions != READ && github:createPrPermissions && config.githubPullRequests.experimental.createView", "group": "navigation@1" }, { "command": "pr.addReviewersToNewPr", - "when": "view == github:createPullRequest && github:createPrPermissions != READ && github:createPrPermissions && config.githubPullRequests.experimental.createView", + "when": "view == github:createPullRequestWebview && github:createPrPermissions != READ && github:createPrPermissions && config.githubPullRequests.experimental.createView", "group": "navigation@2" }, { "command": "pr.addLabelsToNewPr", - "when": "view == github:createPullRequest && github:createPrPermissions != READ && github:createPrPermissions", + "when": "view == github:createPullRequestWebview && github:createPrPermissions != READ && github:createPrPermissions", "group": "navigation@3" }, { "command": "pr.addMilestoneToNewPr", - "when": "view == github:createPullRequest && github:createPrPermissions != READ && github:createPrPermissions && config.githubPullRequests.experimental.createView", + "when": "view == github:createPullRequestWebview && github:createPrPermissions != READ && github:createPrPermissions && config.githubPullRequests.experimental.createView", "group": "navigation@4" } ], @@ -2332,27 +2339,27 @@ "webview/context": [ { "command": "pr.createPrMenuCreate", - "when": "webviewId == 'github:createPullRequest' && github:createPrMenu", + "when": "webviewId == 'github:createPullRequestWebview' && github:createPrMenu", "group": "0_create@0" }, { "command": "pr.createPrMenuDraft", - "when": "webviewId == 'github:createPullRequest' && github:createPrMenu && github:createPrMenuDraft", + "when": "webviewId == 'github:createPullRequestWebview' && github:createPrMenu && github:createPrMenuDraft", "group": "0_create@1" }, { "command": "pr.createPrMenuMerge", - "when": "webviewId == 'github:createPullRequest' && github:createPrMenu && github:createPrMenuMerge", + "when": "webviewId == 'github:createPullRequestWebview' && github:createPrMenu && github:createPrMenuMerge", "group": "1_create@0" }, { "command": "pr.createPrMenuSquash", - "when": "webviewId == 'github:createPullRequest' && github:createPrMenu && github:createPrMenuSquash", + "when": "webviewId == 'github:createPullRequestWebview' && github:createPrMenu && github:createPrMenuSquash", "group": "1_create@1" }, { "command": "pr.createPrMenuRebase", - "when": "webviewId == 'github:createPullRequest' && github:createPrMenu && github:createPrMenuRebase", + "when": "webviewId == 'github:createPullRequestWebview' && github:createPrMenu && github:createPrMenuRebase", "group": "1_create@2" } ] diff --git a/package.nls.json b/package.nls.json index 116e46fd..1fa719a8 100644 --- a/package.nls.json +++ b/package.nls.json @@ -122,6 +122,7 @@ "view.issues.github.name": "Issues", "view.github.create.pull.request.name": "Create", "view.github.compare.changes.name": "Files Changed", + "view.github.compare.changesCommits.name": "Commits", "view.pr.status.github.name": "Changes In Pull Request", "view.github.active.pull.request.name": "Active Pull Request", "view.github.active.pull.request.welcome.name": "Active Pull Request", diff --git a/src/extension.ts b/src/extension.ts index a47a1b00..3825d89f 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -27,7 +27,7 @@ import { registerBuiltinGitProvider, registerLiveShareGitProvider } from './gitP import { GitHubContactServiceProvider } from './gitProviders/GitHubContactServiceProvider'; import { GitLensIntegration } from './integrations/gitlens/gitlensImpl'; import { IssueFeatureRegistrar } from './issues/issueFeatureRegistrar'; -import { CompareChangesTreeProvider } from './view/compareChangesTreeDataProvider'; +import { CompareChanges } from './view/compareChangesTreeDataProvider'; import { CreatePullRequestHelper } from './view/createPullRequestHelper'; import { FileTypeDecorationProvider } from './view/fileTypeDecorationProvider'; import { getInMemPRFileSystemProvider } from './view/inMemPRContentProvider'; @@ -220,7 +220,7 @@ async function init( registerPostCommitCommandsProvider(reposManager, git); // Make sure any compare changes tabs, which come from the create flow, are closed. - CompareChangesTreeProvider.closeTabs(); + CompareChanges.closeTabs(); /* __GDPR__ "startup" : {} */ diff --git a/src/github/createPRViewProvider.ts b/src/github/createPRViewProvider.ts index c3d88078..92190b3f 100644 --- a/src/github/createPRViewProvider.ts +++ b/src/github/createPRViewProvider.ts @@ -38,7 +38,7 @@ const ISSUE_CLOSING_KEYWORDS = new RegExp('closes|closed|close|fixes|fixed|fix|r export class CreatePullRequestViewProvider extends WebviewViewBase implements vscode.WebviewViewProvider { private static readonly ID = 'CreatePullRequestViewProvider'; - public readonly viewType = 'github:createPullRequest'; + public readonly viewType = 'github:createPullRequestWebview'; private _onDone = new vscode.EventEmitter(); readonly onDone: vscode.Event = this._onDone.event; @@ -527,7 +527,7 @@ export class CreatePullRequestViewProvider extends WebviewViewBase implements vs private async create(message: IRequestMessage): Promise { Logger.debug(`Creating pull request with args ${JSON.stringify(message.args)}`, CreatePullRequestViewProvider.ID); - vscode.window.withProgress({ location: { viewId: 'github:createPullRequest' } }, () => { + vscode.window.withProgress({ location: { viewId: 'github:createPullRequestWebview' } }, () => { return vscode.window.withProgress({ location: vscode.ProgressLocation.Notification }, async progress => { let totalIncrement = 0; progress.report({ message: vscode.l10n.t('Checking for upstream branch'), increment: totalIncrement }); diff --git a/src/github/createPRViewProviderNew.ts b/src/github/createPRViewProviderNew.ts index cdadea09..5c802a4a 100644 --- a/src/github/createPRViewProviderNew.ts +++ b/src/github/createPRViewProviderNew.ts @@ -43,7 +43,7 @@ const ISSUE_CLOSING_KEYWORDS = new RegExp('closes|closed|close|fixes|fixed|fix|r export class CreatePullRequestViewProviderNew extends WebviewViewBase implements vscode.WebviewViewProvider, vscode.Disposable { private static readonly ID = 'CreatePullRequestViewProvider'; - public readonly viewType = 'github:createPullRequest'; + public readonly viewType = 'github:createPullRequestWebview'; private _onDone = new vscode.EventEmitter(); readonly onDone: vscode.Event = this._onDone.event; @@ -725,7 +725,7 @@ export class CreatePullRequestViewProviderNew extends WebviewViewBase implements this.setMilestone(createdPR, message.args.milestone)]); }; - vscode.window.withProgress({ location: { viewId: 'github:createPullRequest' } }, () => { + vscode.window.withProgress({ location: { viewId: 'github:createPullRequestWebview' } }, () => { return vscode.window.withProgress({ location: vscode.ProgressLocation.Notification }, async progress => { let totalIncrement = 0; progress.report({ message: vscode.l10n.t('Checking for upstream branch'), increment: totalIncrement }); diff --git a/src/view/compareChangesTreeDataProvider.ts b/src/view/compareChangesTreeDataProvider.ts index 92599927..33768506 100644 --- a/src/view/compareChangesTreeDataProvider.ts +++ b/src/view/compareChangesTreeDataProvider.ts @@ -36,22 +36,6 @@ export function getGitChangeTypeFromApi(status: Status): GitChangeType { } } -class AllFilesNode extends TreeNode { - getTreeItem(): vscode.TreeItem | Promise { - return { - label: vscode.l10n.t('All Changes'), - collapsibleState: vscode.TreeItemCollapsibleState.Expanded - }; - } - constructor(protected readonly children: TreeNode[]) { - super(); - } - - async getChildren(): Promise { - return this.children; - } -} - class CommitNode extends TreeNode { getTreeItem(): vscode.TreeItem | Promise { return { @@ -93,41 +77,31 @@ class CommitNode extends TreeNode { } } -export class CompareChangesTreeProvider implements vscode.TreeDataProvider { +abstract class CompareChangesTreeProvider implements vscode.TreeDataProvider { private _view: vscode.TreeView; private _onDidChangeTreeData = new vscode.EventEmitter(); readonly onDidChangeTreeData = this._onDidChangeTreeData.event; - private _gitHubcontentProvider: GitHubContentProvider | undefined; - private _gitcontentProvider: GitContentProvider | undefined; - private _disposables: vscode.Disposable[] = []; - private _gitHubRepository: GitHubRepository | undefined; - get view(): vscode.TreeView { return this._view; } + set view(view: vscode.TreeView) { + this._view = view; + } + constructor( - private readonly repository: Repository, - private baseOwner: string, - private baseBranchName: string, + private repository: Repository, + protected baseOwner: string, + protected baseBranchName: string, private _compareOwner: string, - private compareBranchName: string, - private compareHasUpstream: boolean, - private folderRepoManager: FolderRepositoryManager, + protected compareBranchName: string, + protected compareHasUpstream: boolean, + protected _gitHubRepository: GitHubRepository | undefined ) { - this._view = vscode.window.createTreeView('github:compareChanges', { - treeDataProvider: this, - }); - - this._gitHubRepository = this.folderRepoManager.gitHubRepositories.find( - repo => repo.remote.owner === this._compareOwner, - ); - - this._disposables.push(this._view); } updateBaseBranch(branch: string): void { @@ -152,6 +126,14 @@ export class CompareChangesTreeProvider implements vscode.TreeDataProvider { // Currently, the list of selectable compare branches it those on GitHub, // plus the current branch which may not be published yet. Check the @@ -183,25 +165,241 @@ export class CompareChangesTreeProvider implements vscode.TreeDataProvider { + return element.getTreeItem(); } - set compareOwner(owner: string) { - if (this._compareOwner !== owner) { - this._gitHubRepository = this.folderRepoManager.gitHubRepositories.find(repo => repo.remote.owner === owner); + protected async getRawGitHubData(gitHubRepository: GitHubRepository) { + const { octokit, remote } = await gitHubRepository.ensure(); - if (this._gitHubcontentProvider && this._gitHubRepository) { - this._gitHubcontentProvider.gitHubRepository = this._gitHubRepository; + const { data } = await octokit.call(octokit.api.repos.compareCommits, { + repo: remote.repositoryName, + owner: remote.owner, + base: `${this.baseOwner}:${this.baseBranchName}`, + head: `${this.compareOwner}:${this.compareBranchName}`, + }); + + const rawFiles = data.files; + const rawCommits = data.commits; + + if (!rawFiles?.length || !rawCommits?.length) { + this.view.message = `There are no commits between the base '${this.baseBranchName}' branch and the comparing '${this.compareBranchName}' branch`; + return {}; + } else if (this._isDisposed) { + return {}; + } else { + this.view.message = undefined; + } + + return { rawFiles, rawCommits, octokit, remote, mergeBase: data.merge_base_commit.sha }; + } + + protected abstract getGitHubChildren(gitHubRepository: GitHubRepository, element?: TreeNode); + + protected abstract getGitChildren(element?: TreeNode); + + async getChildren(element?: TreeNode) { + if (!this._gitHubRepository) { + return []; + } + + try { + if (this.compareHasUpstream) { + return this.getGitHubChildren(this._gitHubRepository, element); + } else { + return this.getGitChildren(element); } - - this._compareOwner = owner; - this._onDidChangeTreeData.fire(); + } catch (e) { + Logger.error(`Comparing changes failed: ${e}`); + return []; } } - getTreeItem(element: TreeNode): vscode.TreeItem | Thenable { - return element.getTreeItem(); + protected _isDisposed: boolean = false; + dispose() { + this._isDisposed = true; + this._disposables.forEach(d => d.dispose()); + this._view.dispose(); + } + + public static closeTabs() { + vscode.window.tabGroups.all.forEach(group => group.tabs.forEach(tab => { + if (tab.input instanceof vscode.TabInputTextDiff) { + if ((tab.input.modified.scheme === Schemes.GithubPr) || (tab.input.modified.scheme === Schemes.GitPr)) { + vscode.window.tabGroups.close(tab); + } + } + })); + } +} + +class CompareChangesFilesTreeProvider extends CompareChangesTreeProvider { + constructor( + repository: Repository, + baseOwner: string, + baseBranchName: string, + compareOwner: string, + compareBranchName: string, + compareHasUpstream: boolean, + gitHubRepository: GitHubRepository | undefined, + private folderRepoManager: FolderRepositoryManager, + ) { + super(repository, baseOwner, baseBranchName, compareOwner, compareBranchName, compareHasUpstream, gitHubRepository); + } + + protected async getGitHubChildren(gitHubRepository: GitHubRepository, element?: TreeNode) { + if (element) { + return element.getChildren(); + } + + const { rawFiles, mergeBase } = await this.getRawGitHubData(gitHubRepository); + if (rawFiles && mergeBase) { + return rawFiles.map(file => { + return new GitHubFileChangeNode( + this, + file.filename, + file.previous_filename, + getGitChangeType(file.status), + mergeBase, + this.compareBranchName, + false, + ); + }); + } + } + + private async getGitFileChildren(diff: Change[]) { + return diff.map(change => { + const filename = pathLib.posix.relative(this.folderRepoManager.repository.rootUri.path, change.uri.path); + const previousFilename = pathLib.posix.relative(this.folderRepoManager.repository.rootUri.path, change.originalUri.path); + return new GitHubFileChangeNode( + this, + filename, + previousFilename, + getGitChangeTypeFromApi(change.status), + this.baseBranchName, + this.compareBranchName, + true, + ); + }); + } + + protected async getGitChildren(element?: TreeNode) { + if (!element) { + const diff = await this.folderRepoManager.repository.diffBetween(this.baseBranchName, this.compareBranchName); + if (diff.length === 0) { + this.view.message = `There are no commits between the base '${this.baseBranchName}' branch and the comparing '${this.compareBranchName}' branch`; + return []; + } else if (!this.compareHasUpstream) { + this.view.message = vscode.l10n.t('Branch {0} has not been pushed yet. Showing local changes.', this.compareBranchName); + } else if (this._isDisposed) { + return []; + } else { + this.view.message = undefined; + } + + return this.getGitFileChildren(diff); + } else { + return element.getChildren(); + } + + } +} + +class CompareChangesCommitsTreeProvider extends CompareChangesTreeProvider { + constructor( + repository: Repository, + baseOwner: string, + baseBranchName: string, + compareOwner: string, + compareBranchName: string, + compareHasUpstream: boolean, + gitHubRepository: GitHubRepository | undefined, + ) { + super(repository, baseOwner, baseBranchName, compareOwner, compareBranchName, compareHasUpstream, gitHubRepository); + } + + protected async getGitHubChildren(gitHubRepository: GitHubRepository, element?: TreeNode) { + if (element) { + return element.getChildren(); + } + + const { rawCommits, octokit, remote } = await this.getRawGitHubData(gitHubRepository); + if (rawCommits && octokit && remote) { + return rawCommits.map((commit, index) => { + return new CommitNode(commit, octokit, remote, index === 0 ? this.baseBranchName : rawCommits[index - 1].sha); + }); + } + } + + protected async getGitChildren(_element?: TreeNode) { + this.view.message = vscode.l10n.t('Branch {0} has not been pushed yet. Unable to show commits.', this.compareBranchName); + return []; + } +} + +export class CompareChanges implements vscode.Disposable { + private _filesView: vscode.TreeView; + private _filesDataProvider: CompareChangesFilesTreeProvider; + private _commitsView: vscode.TreeView; + private _commitsDataProvider: CompareChangesCommitsTreeProvider; + + private _gitHubcontentProvider: GitHubContentProvider | undefined; + private _gitcontentProvider: GitContentProvider | undefined; + + private _disposables: vscode.Disposable[] = []; + + private _gitHubRepository: GitHubRepository | undefined; + + constructor( + repository: Repository, + baseOwner: string, + baseBranchName: string, + compareOwner: string, + compareBranchName: string, + compareHasUpstream: boolean, + private folderRepoManager: FolderRepositoryManager, + ) { + this._gitHubRepository = this.folderRepoManager.gitHubRepositories.find( + repo => repo.remote.owner === compareOwner, + ); + + this._filesDataProvider = new CompareChangesFilesTreeProvider(repository, baseOwner, baseBranchName, compareOwner, compareBranchName, compareHasUpstream, this._gitHubRepository, folderRepoManager); + this._filesView = vscode.window.createTreeView('github:compareChangesFiles', { + treeDataProvider: this._filesDataProvider + }); + this._filesDataProvider.view = this._filesView; + this._commitsDataProvider = new CompareChangesCommitsTreeProvider(repository, baseOwner, baseBranchName, compareOwner, compareBranchName, compareHasUpstream, this._gitHubRepository); + this._commitsView = vscode.window.createTreeView('github:compareChangesCommits', { + treeDataProvider: this._commitsDataProvider + }); + this._commitsDataProvider.view = this._commitsView; + this._disposables.push(this._filesDataProvider); + this._disposables.push(this._filesView); + this._disposables.push(this._commitsDataProvider); + this._disposables.push(this._commitsView); + + this.initialize(); + } + + updateBaseBranch(branch: string): void { + this._filesDataProvider.updateBaseBranch(branch); + this._commitsDataProvider.updateBaseBranch(branch); + } + + updateBaseOwner(owner: string) { + this._filesDataProvider.updateBaseOwner(owner); + this._commitsDataProvider.updateBaseOwner(owner); + } + + async updateCompareBranch(branch?: string): Promise { + this._filesDataProvider.updateCompareBranch(branch); + this._commitsDataProvider.updateCompareBranch(branch); + } + + set compareOwner(owner: string) { + this._filesDataProvider.compareOwner = owner; + this._commitsDataProvider.compareOwner = owner; } private initialize() { @@ -232,128 +430,11 @@ export class CompareChangesTreeProvider implements vscode.TreeDataProvider { - return new GitHubFileChangeNode( - this, - file.filename, - file.previous_filename, - getGitChangeType(file.status), - mergeBase, - this.compareBranchName, - false, - ); - }); - } - - private async getGitHubCommitsChildren(commits: OctokitCommon.CompareCommits['commits'], octokit: LoggingOctokit, remote: GitHubRemote): Promise { - return commits.map((commit, index) => { - return new CommitNode(commit, octokit, remote, index === 0 ? this.baseBranchName : commits[index - 1].sha); - }); - } - - private async getGitHubChildren(gitHubRepository: GitHubRepository, element?: TreeNode) { - if (element) { - return element.getChildren(); - } - - const { octokit, remote } = await gitHubRepository.ensure(); - - const { data } = await octokit.call(octokit.api.repos.compareCommits, { - repo: remote.repositoryName, - owner: remote.owner, - base: `${this.baseOwner}:${this.baseBranchName}`, - head: `${this.compareOwner}:${this.compareBranchName}`, - }); - - const rawFiles = data.files; - const rawCommits = data.commits; - - if (!rawFiles?.length || !rawCommits?.length) { - this._view.message = `There are no commits between the base '${this.baseBranchName}' branch and the comparing '${this.compareBranchName}' branch`; - return []; - } else if (this._isDisposed) { - return []; - } else { - this._view.message = undefined; - } - - const files = await this.getGitHubFileChildren(rawFiles, data.merge_base_commit.sha); - const commits = await this.getGitHubCommitsChildren(rawCommits, octokit, remote); - return [...commits, new AllFilesNode(files)]; - } - - private async getGitFileChildren(diff: Change[]) { - return diff.map(change => { - const filename = pathLib.posix.relative(this.folderRepoManager.repository.rootUri.path, change.uri.path); - const previousFilename = pathLib.posix.relative(this.folderRepoManager.repository.rootUri.path, change.originalUri.path); - return new GitHubFileChangeNode( - this, - filename, - previousFilename, - getGitChangeTypeFromApi(change.status), - this.baseBranchName, - this.compareBranchName, - true, - ); - }); - } - - private async getGitChildren(element?: TreeNode) { - if (!element) { - const diff = await this.folderRepoManager.repository.diffBetween(this.baseBranchName, this.compareBranchName); - if (diff.length === 0) { - this._view.message = `There are no commits between the base '${this.baseBranchName}' branch and the comparing '${this.compareBranchName}' branch`; - return []; - } else if (!this.compareHasUpstream) { - this._view.message = vscode.l10n.t('Branch {0} has not been pushed yet. Showing local changes.', this.compareBranchName); - } else if (this._isDisposed) { - return []; - } else { - this._view.message = undefined; - } - - return this.getGitFileChildren(diff); - } else { - return element.getChildren(); - } - - } - - async getChildren(element?: TreeNode) { - if (!this._gitHubRepository) { - return []; - } - - this.initialize(); - - // Example tree (only when there's an upstream compare branch, when there isn't we just show files) - // 2 commits - // First commit - // Second commit - // 2 changed files - // file1 - // file2 - - try { - if (this.compareHasUpstream) { - return this.getGitHubChildren(this._gitHubRepository, element); - } else { - return this.getGitChildren(element); - } - } catch (e) { - Logger.error(`Comparing changes failed: ${e}`); - return []; - } - } - - private _isDisposed: boolean = false; dispose() { - this._isDisposed = true; this._disposables.forEach(d => d.dispose()); this._gitHubcontentProvider = undefined; this._gitcontentProvider = undefined; - this._view.dispose(); + this._filesView.dispose(); } public static closeTabs() { diff --git a/src/view/createPullRequestHelper.ts b/src/view/createPullRequestHelper.ts index c819c643..09a6f23e 100644 --- a/src/view/createPullRequestHelper.ts +++ b/src/view/createPullRequestHelper.ts @@ -11,12 +11,12 @@ import { CreatePullRequestViewProvider } from '../github/createPRViewProvider'; import { CreatePullRequestViewProviderNew } from '../github/createPRViewProviderNew'; import { FolderRepositoryManager, PullRequestDefaults } from '../github/folderRepositoryManager'; import { PullRequestModel } from '../github/pullRequestModel'; -import { CompareChangesTreeProvider } from './compareChangesTreeDataProvider'; +import { CompareChanges } from './compareChangesTreeDataProvider'; export class CreatePullRequestHelper implements vscode.Disposable { private _disposables: vscode.Disposable[] = []; private _createPRViewProvider: CreatePullRequestViewProvider | CreatePullRequestViewProviderNew | undefined; - private _treeView: CompareChangesTreeProvider | undefined; + private _treeView: CompareChanges | undefined; private _onDidCreate = new vscode.EventEmitter(); readonly onDidCreate: vscode.Event = this._onDidCreate.event; @@ -200,7 +200,7 @@ export class CreatePullRequestHelper implements vscode.Disposable { ); const compareOrigin = await folderRepoManager.getOrigin(branch); - this._treeView = new CompareChangesTreeProvider( + this._treeView = new CompareChanges( folderRepoManager.repository, pullRequestDefaults.owner, pullRequestDefaults.base, diff --git a/webviews/components/user.tsx b/webviews/components/user.tsx index 26b8fbc0..1cb4e8c1 100644 --- a/webviews/components/user.tsx +++ b/webviews/components/user.tsx @@ -7,7 +7,7 @@ import * as React from 'react'; import { IAccount, IActor, ITeam, reviewerLabel } from '../../src/github/interface'; import { Icon } from './icon'; -export const Avatar = ({ for: author }: { for: Partial }) => ( +const InnerAvatar = ({ for: author }: { for: Partial }) => ( <> {author.avatarUrl ? ( @@ -17,6 +17,16 @@ export const Avatar = ({ for: author }: { for: Partial }) => ( ); +export const Avatar = ({ for: author, link = true }: { for: Partial, link?: boolean }) => { + if (link) { + return + + ; + } else { + return ; + } +}; + export const AuthorLink = ({ for: author, text = reviewerLabel(author) }: { for: IActor | ITeam; text?: string }) => ( {text} diff --git a/webviews/createPullRequestViewNew/app.tsx b/webviews/createPullRequestViewNew/app.tsx index eb4ae89a..af73dd78 100644 --- a/webviews/createPullRequestViewNew/app.tsx +++ b/webviews/createPullRequestViewNew/app.tsx @@ -210,7 +210,7 @@ export function main() { {params.assignees.map(assignee =>
  • - + {assignee.login}
  • )} @@ -227,7 +227,7 @@ export function main() { {params.reviewers.map(reviewer =>
  • - + {isTeam(reviewer) ? reviewer.slug : reviewer.login}
  • )} @@ -288,7 +288,7 @@ export function main() { {createMethodLabel(ctx.createParams.isDraft, ctx.createParams.autoMerge, ctx.createParams.autoMergeMethod).label}
    -