andygrunwald / andygrunwald/go-gerrit

Systematic type sync with upstream Gerrit REST API

Offen
#213 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
106
Forks
54
Ø Merge
7 Std. 21 Min.
Gemergte PRs (30 T.)
3

Beschreibung

Several open issues and PRs point to the same underlying problem: go-gerrit structs have drifted from the upstream Gerrit REST API over time. Rather than fixing these one-off, this issue tracks a systematic pass to bring all types in line with the current Gerrit source.

## Evidence of drift

The following open issues report missing or incorrectly typed fields:

- #111 — `ConfigInput.MaxObjectSizeLimit` uses a struct type instead of string, causing 400 on `SetConfig`
- #167 — `ChangeInfo` missing `submit_records`
- #179 — `ChangeInput` missing `response_format_options` (now fixed on master)
- #183 — `ChangeInput` missing `patch` field (now fixed on master)

I've also hit missing and incorrectly typed fields myself while building a tool on top of go-gerrit — notably `FixSuggestionInfo.Replacements` being a singular value instead of a slice, and `CommentInput` lacking `fix_suggestions` and `tag` fields.

Open PRs addressing parts of this:

- #112 — fixes `ConfigInput.MaxObjectSizeLimit` type
- #116 — adds robot comment endpoints, fixes `FixSuggestions`/`Replacements` types
- #168 — adds `SubmitRecords` to `ChangeInfo`
- #197 — adds label definition types and label sub-API for projects

Beyond what's already reported, a cross-reference against the Gerrit Java source (`com.google.gerrit.extensions`) shows the gap is wider than these individual reports suggest — there are dozens of entity types that exist upstream but have no Go counterpart, and several existing structs are missing fields that the API returns or accepts.

## Plan

I intend to perform a full iteration over the current type definitions:

1. Compare every go-gerrit struct field-by-field against the corresponding Gerrit Java class
2. Add missing fields to existing structs
3. Fix incorrectly typed fields
4. Add missing entity types where they are part of the documented REST API
5. Remove or deprecate fields that no longer exist upstream

Note: the existing open PRs listed above are independent contributions by other authors. The work under this issue may overlap with or supersede them, but they are not part of this effort.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.