Skip to content

Add groups field to Label descriptors#101

Merged
em3s merged 1 commit intomainfrom
init/label-descriptor-groups
Feb 3, 2026
Merged

Add groups field to Label descriptors#101
em3s merged 1 commit intomainfrom
init/label-descriptor-groups

Conversation

@eazyhozy
Copy link
Copy Markdown
Member

@eazyhozy eazyhozy commented Jan 22, 2026

Summary

Add groups field to v2 Label descriptor classes for schema consistency.
The groups feature was introduced in v3, and the v2 Label metadata API was updated to include groups for forward compatibility. However, some v2 code was missing the groups field, which could cause unexpected behavior during serialization/deserialization. This PR adds the groups field to ensure consistency across all Label-related classes.

Changes

core-java

  • LabelDescriptor.java: Add List<Group> groups() field

core

  • V2LabelDescriptor.kt: Add groups: List<Group> field

codec-java

  • LabelDTO.java: Add List<Group> groups field
  • Group.java: New class for codec-java module (independent of core module)
  • GroupType.java: New enum for codec-java module

Tests

  • Update LabelDTOTests.java and V2LabelSerializationTest.kt to include groups field

How to Test

./gradlew :core:test :core-java:test :codec-java:test

@eazyhozy eazyhozy self-assigned this Jan 22, 2026
Add groups field to LabelDescriptor, V2LabelDescriptor, and LabelDTO
to align schema with LabelCreatePayload and LabelUpdatePayload.

- Add List<Group> groups() to LabelDescriptor (core-java)
- Add groups: List<Group> to V2LabelDescriptor (core)
- Add List<Group> groups to LabelDTO (codec-java)
- Create Group and GroupType classes for codec-java module
- Update related tests to include groups field

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@eazyhozy eazyhozy force-pushed the init/label-descriptor-groups branch from 4f4b171 to c573e23 Compare January 22, 2026 12:21
@eazyhozy eazyhozy marked this pull request as ready for review January 22, 2026 12:29
@eazyhozy eazyhozy requested a review from em3s as a code owner January 22, 2026 12:29
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request module:core labels Jan 22, 2026
@eazyhozy
Copy link
Copy Markdown
Member Author

@em3s Please review this PR. Let me know if any improvement or adjustment is needed.

Copy link
Copy Markdown
Contributor

@em3s em3s left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 3, 2026
@em3s em3s merged commit 0d386e3 into main Feb 3, 2026
10 checks passed
@em3s em3s changed the title feat(core): add groups field to Label descriptors Add groups field to Label descriptors Feb 12, 2026
@em3s em3s deleted the init/label-descriptor-groups branch March 1, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants