andygrunwald / andygrunwald/go-gerrit

Systematic type sync with upstream Gerrit REST API

Aberta
#213 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Go
Estrelas
106
Forks
54
Merge médio
7h 21min
PRs com merge (30d)
3

Descrição

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.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.