feat(invitations): Expand invitation context to external metadata#2299
Merged
javirln merged 5 commits intoJul 31, 2025
Merged
Conversation
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
b3cc86c to
6582f1b
Compare
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
jiparis
reviewed
Jul 31, 2025
| func (uc *OrgInvitationUseCase) processGroupMembership(ctx context.Context, invitation *OrgInvitation, orgUUID uuid.UUID, userUUID uuid.UUID) error { | ||
| // Skip if there's no group to join in the invitation context | ||
| if invitation.Context == nil || invitation.Context.GroupIDToJoin == uuid.Nil { | ||
| if invitation.Context == nil || invitation.Context.GroupIDToJoin == nil || *invitation.Context.GroupIDToJoin == uuid.Nil { |
jiparis
approved these changes
Jul 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces changes to improve the handling of organization invitations, particularly in the context of joining groups and projects. The updates include modifying the
OrgInvitationContextstructure to use pointers for UUID fields, adding support for external metadata, and enhancing test coverage to handle edge cases like nil UUIDs.Before, since the groupID and projectID were not pointers, they were being stored in the DB as their nil representation of UUUID the
0000-0000...by adding a pointer, the are not store at all. The UUID != uuid.Nil check is there for already stored data.