@@ -35,7 +35,7 @@ import { GitProviderUtils } from '@gitkraken/provider-apis/provider-utils';
3535import type { CloudSelfHostedIntegrationId , IntegrationId } from '../../../constants.integrations' ;
3636import { HostingIntegrationId , IssueIntegrationId , SelfHostedIntegrationId } from '../../../constants.integrations' ;
3737import type { Account as UserAccount } from '../../../git/models/author' ;
38- import type { IssueMember , SearchedIssue } from '../../../git/models/issue' ;
38+ import type { IssueMember , IssueProject , SearchedIssue } from '../../../git/models/issue' ;
3939import { RepositoryAccessLevel } from '../../../git/models/issue' ;
4040import type {
4141 PullRequestMember ,
@@ -622,6 +622,7 @@ export function toSearchedIssue(
622622 id : issue . project ?. id ?? '' ,
623623 name : issue . project ?. name ?? '' ,
624624 resourceId : issue . project ?. resourceId ?? '' ,
625+ resourceName : issue . project ?. namespace ?? '' ,
625626 } ,
626627 repository :
627628 issue . repository ?. owner ?. login != null
@@ -885,7 +886,11 @@ export function toProviderPullRequest(pr: PullRequest): ProviderPullRequest {
885886 } ;
886887}
887888
888- export function fromProviderPullRequest ( pr : ProviderPullRequest , integration : Integration ) : PullRequest {
889+ export function fromProviderPullRequest (
890+ pr : ProviderPullRequest ,
891+ integration : Integration ,
892+ options ?: { project ?: IssueProject } ,
893+ ) : PullRequest {
889894 return new PullRequest (
890895 integration ,
891896 fromProviderAccount ( pr . author ) ,
@@ -898,6 +903,7 @@ export function fromProviderPullRequest(pr: ProviderPullRequest, integration: In
898903 repo : pr . repository . name ,
899904 // This has to be here until we can take this information from ProviderPullRequest:
900905 accessLevel : RepositoryAccessLevel . Write ,
906+ id : pr . repository . id ,
901907 } ,
902908 fromProviderPullRequestState ( pr . state ) ,
903909 pr . createdDate ,
@@ -941,6 +947,7 @@ export function fromProviderPullRequest(pr: ProviderPullRequest, integration: In
941947 pr . headCommit ?. buildStatuses ?. [ 0 ] ?. state
942948 ? fromProviderBuildStatusState [ pr . headCommit . buildStatuses [ 0 ] . state ]
943949 : undefined ,
950+ options ?. project ,
944951 ) ;
945952}
946953
0 commit comments