Skip to content

Add support for group membership replace ops#61

Merged
papertigers merged 6 commits intomainfrom
spr/papertigers/add-support-for-group-membership-replace-ops
Aug 22, 2025
Merged

Add support for group membership replace ops#61
papertigers merged 6 commits intomainfrom
spr/papertigers/add-support-for-group-membership-replace-ops

Conversation

@papertigers
Copy link
Copy Markdown
Contributor

This adds support for PATCHing a group with a replace op of its members.

Created using jj-spr 1.3.6-beta.1

[skip ci]
Created using jj-spr 1.3.6-beta.1
Created using jj-spr 1.3.6-beta.1
Created using jj-spr 1.3.6-beta.1
Created using jj-spr 1.3.6-beta.1

[skip ci]
Created using jj-spr 1.3.6-beta.1
@papertigers papertigers changed the base branch from spr/papertigers/main.add-support-for-group-membership-replace-ops to main August 22, 2025 19:59
Copy link
Copy Markdown
Collaborator

@jmpesp jmpesp left a comment

Choose a reason for hiding this comment

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

ship it!

group.resource.members =
(!new_members.is_empty()).then_some(new_members);
}
// Treat this as a display name change
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The None block here doesn't exactly assume this is a display name change due to the deserialization checking for the display_name field - maybe take this out and link to the spec's bit about this?

If the "path" parameter is omitted, the target is assumed to be
the resource itself. In this case, the "value" attribute SHALL
contain a list of one or more attributes that are to be replaced.

@papertigers papertigers merged commit 7473746 into main Aug 22, 2025
3 checks passed
@papertigers papertigers deleted the spr/papertigers/add-support-for-group-membership-replace-ops branch August 22, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants