You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "petkostas (via GitHub)" <gi...@apache.org> on 2025/09/22 15:18:36 UTC

[PR] Fix/8538 GitHub zero time [incubator-devlake]

petkostas opened a new pull request, #8583:
URL: https://github.com/apache/incubator-devlake/pull/8583

   ### Summary
   GitHub GraphQL returns zero time (`&time.Time{}`) for `nullable` fields, this leads to GORM not properly handling this cases.
   This PR:
   - Introduces a new core helper util `NilIfZeroTime` in order to ensure that `*time.Time` fields are assigned the `nil` value.
   - Fixes the relevant cases in both collectors and extractors (as existing entries in the DB should be properly handled as well).
   
   
   ### Does this close any open issues?
   Closes #8538 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/8538 GitHub zero time [incubator-devlake]

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh merged PR #8583:
URL: https://github.com/apache/incubator-devlake/pull/8583


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/8538 GitHub zero time [incubator-devlake]

Posted by "coocoobau (via GitHub)" <gi...@apache.org>.
coocoobau commented on code in PR #8583:
URL: https://github.com/apache/incubator-devlake/pull/8583#discussion_r2475059017


##########
backend/plugins/github/tasks/release_convertor.go:
##########
@@ -73,7 +73,7 @@ func ConvertRelease(taskCtx plugin.SubTaskContext) errors.Error {
 				DomainEntity: domainlayer.DomainEntity{
 					Id: releaseIdGen.Generate(githubRelease.ConnectionId, githubRelease.Id),
 				},
-				PublishedAt:  githubRelease.PublishedAt,
+				PublishedAt:  *githubRelease.PublishedAt,

Review Comment:
   @klesh and @petkostas, this line introduced #8624 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix/8538 GitHub zero time [incubator-devlake]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8583:
URL: https://github.com/apache/incubator-devlake/pull/8583#issuecomment-3326681803

   🤖 The current file has a conflict, and the pr cannot be automatically created.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org