Skip to content

fix(models): correct Build and Buildset to match Zuul API response fo…#10

Merged
clappingmonkey merged 1 commit intomainfrom
fix/zuul-api-ref-model
Mar 17, 2026
Merged

fix(models): correct Build and Buildset to match Zuul API response fo…#10
clappingmonkey merged 1 commit intomainfrom
fix/zuul-api-ref-model

Conversation

@clappingmonkey
Copy link
Copy Markdown
Owner

…rmat

The Zuul API returns ref information as nested objects, not as root-level fields. This change fixes the data models to correctly parse the API responses:

  • Add new Ref struct for nested ref objects containing project, branch, change, patchset, ref, oldrev, newrev, and ref_url fields
  • Update Build struct: change Ref from string to *Ref object, remove root-level project/branch/change/patchset/ref_url fields, add execute_time, held, error_detail, final, event_timestamp, and queue_item_uuid fields, rename node_name to nodeset
  • Update Buildset struct: replace root-level ref fields with Refs []Ref array, add event_timestamp and queue_item_uuid fields

Tested against OpenDev Zuul (zuul.opendev.org) and verified that get_build, list_builds, and list_buildsets correctly parse and serialize the new nested ref structure.

…rmat

The Zuul API returns ref information as nested objects, not as root-level
fields. This change fixes the data models to correctly parse the API
responses:

- Add new Ref struct for nested ref objects containing project, branch,
  change, patchset, ref, oldrev, newrev, and ref_url fields
- Update Build struct: change Ref from string to *Ref object, remove
  root-level project/branch/change/patchset/ref_url fields, add
  execute_time, held, error_detail, final, event_timestamp, and
  queue_item_uuid fields, rename node_name to nodeset
- Update Buildset struct: replace root-level ref fields with Refs []Ref
  array, add event_timestamp and queue_item_uuid fields

Tested against OpenDev Zuul (zuul.opendev.org) and verified that
get_build, list_builds, and list_buildsets correctly parse and serialize
the new nested ref structure.
@clappingmonkey clappingmonkey merged commit 232efe0 into main Mar 17, 2026
6 checks passed
@clappingmonkey clappingmonkey deleted the fix/zuul-api-ref-model branch March 17, 2026 21:11
@zuul-mcp-bot zuul-mcp-bot Bot mentioned this pull request Mar 17, 2026
clappingmonkey pushed a commit that referenced this pull request Mar 17, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.2.2](v0.2.1...v0.2.2)
(2026-03-17)


### Bug Fixes

* **models:** correct Build and Buildset to match Zuul API response fo…
([#10](#10))
([232efe0](232efe0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: zuul-mcp-bot[bot] <268975808+zuul-mcp-bot[bot]@users.noreply.github.com>
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.

1 participant