Skip to content

Conversation

petkostas
Copy link
Contributor

@petkostas petkostas commented Sep 22, 2025

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 #8442

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. component/plugins This issue or PR relates to plugins needs-cherrypick-v1.0 pr-type/bug-fix This PR fixes a bug labels Sep 22, 2025
Copy link
Contributor

@klesh klesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Nice work. Thanks for your contribution.

@klesh klesh merged commit 0d753c4 into main Sep 24, 2025
24 checks passed
@klesh klesh deleted the fix/8538-github-zero-time branch September 24, 2025 06:08
Copy link
Contributor

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

@github-actions github-actions bot added the bot/auto-cherry-pick-failed auto cherry pick failed label Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot/auto-cherry-pick-failed auto cherry pick failed component/plugins This issue or PR relates to plugins needs-cherrypick-v1.0 pr-type/bug-fix This PR fixes a bug size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
2 participants