@@ -249,7 +249,7 @@ export class IssueOverviewPanel<TItem extends IssueModel = IssueModel> extends W
249249 return isInCodespaces ( ) ;
250250 }
251251
252- protected getInitializeContext ( currentUser : IAccount , issue : IssueModel , timelineEvents : TimelineEvent [ ] , repositoryAccess : RepoAccessAndMergeMethods , viewerCanEdit : boolean , assignableUsers : IAccount [ ] ) : Issue {
252+ protected async getInitializeContext ( currentUser : IAccount , issue : IssueModel , timelineEvents : TimelineEvent [ ] , repositoryAccess : RepoAccessAndMergeMethods , viewerCanEdit : boolean , assignableUsers : IAccount [ ] ) : Promise < Issue > {
253253 const hasWritePermission = repositoryAccess . hasWritePermission ;
254254 const canEdit = hasWritePermission || viewerCanEdit ;
255255 const labels = issue . item . labels . map ( label => ( {
@@ -266,12 +266,12 @@ export class IssueOverviewPanel<TItem extends IssueModel = IssueModel> extends W
266266 url : issue . html_url ,
267267 createdAt : issue . createdAt ,
268268 body : issue . body ,
269- bodyHTML : issue . bodyHTML ,
269+ bodyHTML : await this . processLinksInBodyHtml ( issue . bodyHTML ) ,
270270 labels : labels ,
271271 author : issue . author ,
272272 state : issue . state ,
273273 stateReason : issue . stateReason ,
274- events : timelineEvents ,
274+ events : await this . processTimelineEvents ( timelineEvents ) ,
275275 continueOnGitHub : this . continueOnGitHub ( ) ,
276276 canEdit,
277277 hasWritePermission,
@@ -322,10 +322,7 @@ export class IssueOverviewPanel<TItem extends IssueModel = IssueModel> extends W
322322 this . setPanelTitle ( this . buildPanelTitle ( issueModel . number , issueModel . title ) ) ;
323323
324324 // Process permalinks in bodyHTML before sending to webview
325- const processedBodyHTML = await this . processLinksInBodyHtml ( issue . bodyHTML ) ;
326- const context = this . getInitializeContext ( currentUser , issue , await this . processTimelineEvents ( timelineEvents ) , repositoryAccess , viewerCanEdit , assignableUsers [ this . _item . remote . remoteName ] ?? [ ] ) ;
327- // Override bodyHTML with processed version without mutating original issue
328- context . bodyHTML = processedBodyHTML ;
325+ const context = await this . getInitializeContext ( currentUser , issue , timelineEvents , repositoryAccess , viewerCanEdit , assignableUsers [ this . _item . remote . remoteName ] ?? [ ] ) ;
329326
330327 Logger . debug ( 'pr.initialize' , IssueOverviewPanel . ID ) ;
331328 this . _postMessage ( {
0 commit comments