Skip to content

Commit 9db918d

Browse files
Copilotalexr00
andcommitted
Add copy link button back to PR overview header
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent a5aedb1 commit 9db918d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

webviews/components/header.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { CodingAgentContext, OverviewContext, PullRequest } from '../../src/gith
1111
import PullRequestContext from '../common/context';
1212
import { useStateProp } from '../common/hooks';
1313
import { ContextDropdown } from './contextDropdown';
14-
import { copilotErrorIcon, copilotInProgressIcon, copilotSuccessIcon, editIcon, issueClosedIcon, issueIcon, loadingIcon, mergeIcon, prClosedIcon, prDraftIcon, prOpenIcon } from './icon';
14+
import { copilotErrorIcon, copilotInProgressIcon, copilotSuccessIcon, copyIcon, editIcon, issueClosedIcon, issueIcon, loadingIcon, mergeIcon, prClosedIcon, prDraftIcon, prOpenIcon } from './icon';
1515
import { AuthorLink, Avatar } from './user';
1616

1717
export function Header({
@@ -126,11 +126,14 @@ function Title({ title, titleHTML, number, url, inEditMode, setEditMode, setCurr
126126
}
127127

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

131131
return (
132132
<div className="button-group">
133133
<CheckoutButton {...{ isCurrentlyCheckedOut, isIssue, repositoryDefaultBranch, owner, repo, number }} />
134+
<button title="Copy pull request link" onClick={copyPrLink} className="secondary">
135+
{copyIcon}
136+
</button>
134137
<button title="Refresh with the latest data from GitHub" onClick={refresh} className="secondary">
135138
Refresh
136139
</button>

0 commit comments

Comments
 (0)