Skip to content
Closed
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
9 changes: 7 additions & 2 deletions webviews/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { CodingAgentContext, OverviewContext, PullRequest } from '../../src/gith
import PullRequestContext from '../common/context';
import { useStateProp } from '../common/hooks';
import { ContextDropdown } from './contextDropdown';
import { copilotErrorIcon, copilotInProgressIcon, copilotSuccessIcon, editIcon, issueClosedIcon, issueIcon, loadingIcon, mergeIcon, prClosedIcon, prDraftIcon, prOpenIcon } from './icon';
import { copilotErrorIcon, copilotInProgressIcon, copilotSuccessIcon, copyIcon, editIcon, issueClosedIcon, issueIcon, loadingIcon, mergeIcon, prClosedIcon, prDraftIcon, prOpenIcon } from './icon';
import { AuthorLink, Avatar } from './user';

export function Header({
Expand Down Expand Up @@ -126,11 +126,16 @@ function Title({ title, titleHTML, number, url, inEditMode, setEditMode, setCurr
}

function ButtonGroup({ isCurrentlyCheckedOut, isIssue, repositoryDefaultBranch, owner, repo, number, busy }) {
const { refresh } = useContext(PullRequestContext);
const { refresh, copyPrLink } = useContext(PullRequestContext);

return (
<div className="button-group">
<CheckoutButton {...{ isCurrentlyCheckedOut, isIssue, repositoryDefaultBranch, owner, repo, number }} />
{!isIssue ? (
<button title="Copy link" onClick={copyPrLink} className="secondary">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Also show for issues. Place the button after the rename button and style it like the rename button.

{copyIcon}
</button>
) : null}
<button title="Refresh with the latest data from GitHub" onClick={refresh} className="secondary">
Refresh
</button>
Expand Down
Loading