@@ -10,7 +10,7 @@ import { Logger } from '../../../system/logger';
1010import type { IntegrationAuthenticationProviderDescriptor } from '../authentication/integrationAuthenticationProvider' ;
1111import type { ProviderAuthenticationSession } from '../authentication/models' ;
1212import { IssuesIntegration } from '../models/issuesIntegration' ;
13- import type { IssueFilter } from './models' ;
13+ import type { IssueFilter , ProviderIssue } from './models' ;
1414import { fromProviderIssue , providersMetadata , toIssueShape } from './models' ;
1515
1616const metadata = providersMetadata [ IssuesCloudHostIntegrationId . Linear ] ;
@@ -210,19 +210,29 @@ export class LinearIntegration extends IssuesIntegration<IssuesCloudHostIntegrat
210210 }
211211 return issues ;
212212 }
213- protected override getProviderIssueOrPullRequest (
214- _session : ProviderAuthenticationSession ,
215- _resource : ResourceDescriptor ,
216- _id : string ,
213+ protected override async getProviderIssueOrPullRequest (
214+ session : ProviderAuthenticationSession ,
215+ resource : ResourceDescriptor ,
216+ id : string ,
217217 _type : undefined | IssueOrPullRequestType ,
218218 ) : Promise < IssueOrPullRequest | undefined > {
219- throw new Error ( 'Method not implemented.' ) ;
219+ const issue = await this . getRawProviderIssue ( session , resource , id ) ;
220+ return issue && toIssueShape ( issue , this ) ;
220221 }
221222 protected override async getProviderIssue (
222223 session : ProviderAuthenticationSession ,
223224 resource : ResourceDescriptor ,
224225 id : string ,
225226 ) : Promise < Issue | undefined > {
227+ const result = await this . getRawProviderIssue ( session , resource , id ) ;
228+ return result && fromProviderIssue ( result , this ) ;
229+ }
230+
231+ private async getRawProviderIssue (
232+ session : ProviderAuthenticationSession ,
233+ resource : ResourceDescriptor ,
234+ id : string ,
235+ ) : Promise < ProviderIssue | undefined > {
226236 const api = await this . getProvidersApi ( ) ;
227237 try {
228238 if ( ! isIssueResourceDescriptor ( resource ) ) {
@@ -243,7 +253,7 @@ export class LinearIntegration extends IssuesIntegration<IssuesCloudHostIntegrat
243253
244254 if ( result == null ) return undefined ;
245255
246- return fromProviderIssue ( result , this ) ;
256+ return result ;
247257 } catch ( ex ) {
248258 Logger . error ( ex , 'getProviderIssue' ) ;
249259 return undefined ;
0 commit comments