@@ -931,26 +931,29 @@ export class GitHubFetcherService implements OnModuleInit {
931931 break ;
932932 }
933933
934- await this . issueRepo . upsert (
935- {
936- repoFullName,
937- issueNumber : issue . number ,
938- authorGithubId : String ( issue . author ?. databaseId ?? "" ) ,
939- authorLogin : issue . author ?. login ?? null ,
940- authorAssociation : issue . authorAssociation ?? null ,
941- title : issue . title ,
942- state : issue . state , // OPEN / CLOSED
943- stateReason : issue . stateReason ?? null ,
944- createdAt : issue . createdAt ,
945- closedAt : issue . closedAt ?? null ,
946- updatedAt : issue . updatedAt ?? null ,
947- lastEditedAt : issue . lastEditedAt ?? null ,
948- labels : ( issue . labels ?. nodes ?? [ ] ) . map (
949- ( l : { name : string } ) => l . name ,
950- ) ,
951- } ,
952- [ "repoFullName" , "issueNumber" ] ,
953- ) ;
934+ const issueData : Partial < Issue > = {
935+ repoFullName,
936+ issueNumber : issue . number ,
937+ authorGithubId : String ( issue . author ?. databaseId ?? "" ) ,
938+ authorLogin : issue . author ?. login ?? null ,
939+ authorAssociation : issue . authorAssociation ?? null ,
940+ title : issue . title ,
941+ state : issue . state , // OPEN / CLOSED
942+ stateReason : issue . stateReason ?? null ,
943+ createdAt : issue . createdAt ,
944+ closedAt : issue . closedAt ?? null ,
945+ updatedAt : issue . updatedAt ?? null ,
946+ lastEditedAt : issue . lastEditedAt ?? null ,
947+ labels : ( issue . labels ?. nodes ?? [ ] ) . map (
948+ ( l : { name : string } ) => l . name ,
949+ ) ,
950+ } ;
951+
952+ if ( issue . state === "OPEN" ) {
953+ issueData . solvedByPr = null ;
954+ }
955+
956+ await this . issueRepo . upsert ( issueData , [ "repoFullName" , "issueNumber" ] ) ;
954957
955958 // Upsert label events for this issue
956959 await this . saveLabelTimelineEvents (
0 commit comments