RetentionDays cannot be set to 0 (retain forever) via the normal create path #79
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Surfaced during #63 / PR #78.
Webhook.RetentionDayscarriesgorm:"default:30", so GORM substitutes the column default (30) for a zero value onCreate. The retention reaper correctly treats aRetentionDaysof 0 or less as "retain forever", but that value is unreachable through the normal create path: a webhook created without an explicit positive value gets 30, and there is no way to express "keep forever" from the create/edit flow.Net effect today: every webhook has an effective minimum retention (default 30 days) and cannot be set to keep events indefinitely.
Definition of done:
Note: this ties into the web-UI cleanup (#57) — whether and how retention is surfaced in the UI.
let's use 365*1000 days as the retain-forever value.
attempting to set retentiondays to 0 should rewrite this on insert/update to be the 365*1000 value in the db