Expose invitation expiry timestamp for SCIM org memberships#149
Expose invitation expiry timestamp for SCIM org memberships#149c1-dev-bot[bot] wants to merge 1 commit into
Conversation
Add created_at, expires_at (created_at + 7 days), failed_at, failed_reason, and role fields to the invitation user profile. Also set the CreatedAt trait on the user resource when available. This enables customers to identify expired pending SCIM invitations and clean up seats occupied by stale invites. Fixes: CXH-1455
|
Claude finished @c1-dev-bot[bot]'s task in 1m 4s —— View job PR Review: Expose invitation expiry timestamp for SCIM org memberships
Overall: This PR looks good. The changes are clean, well-scoped, and correctly use the go-github library's What works well
Minor observations
VerdictLooks good to merge after standard manual testing per the test plan. The implementation is minimal, correct, and doesn't affect existing sync/provisioning behavior. |
Summary
created_at,expires_at(created_at + 7 days),role,failed_at, andfailed_reasonfields to the invitation resource user profileCreatedAtuser trait on invitation resources when the timestamp is available from the GitHub APIBackground
GitHub expires org invitations after 7 days, but pending members continue to occupy seats. The baton-github connector already syncs pending invitations via the
/orgs/{org}/invitationsendpoint, but was not exposing theCreatedAttimestamp from the GitHub API response. Without this data, customers had no way to determine when an invitation was sent or whether it had expired.The GitHub API's
Invitationtype providesCreatedAtandFailedAttimestamps. Since GitHub does not expose an explicitExpiresAtfield, we compute it asCreatedAt + 7 days(the documented GitHub expiry window).Test plan
created_atandexpires_atin their profile after syncfailed_atandfailed_reasonappear in profile when invitation has failedrolefield is populated in profileCreatedAtuser trait is set on invitation resourcesFixes: CXH-1455
Automated PR Notice
This PR was automatically created by c1-dev-bot as a potential implementation.
This code requires: