From 7b020d99d62d67102626c4495e4fbb8d16fa7f42 Mon Sep 17 00:00:00 2001 From: Tim Wang Date: Tue, 7 Feb 2023 12:52:21 -0800 Subject: [PATCH] Add revision kind to RevisionInfo --- changes.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/changes.go b/changes.go index 6d1e8d5..66f3ffe 100644 --- a/changes.go +++ b/changes.go @@ -7,6 +7,19 @@ import ( "net/http" ) +// RevisionKind describes the change kind. +// +// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#revision-info +type RevisionKind string + +const ( + Rework RevisionKind = "REWORK" + TrivialRebase RevisionKind = "TRIVIAL_REBASE" + MergeFirstParentUpdate RevisionKind = "MERGE_FIRST_PARENT_UPDATE" + NoCodeChange RevisionKind = "NO_CODE_CHANGE" + NoChange RevisionKind = "NO_CHANGE" +) + // ChangesService contains Change related REST endpoints // // Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html @@ -469,6 +482,7 @@ type MergeInput struct { // RevisionInfo entity contains information about a patch set. type RevisionInfo struct { + Kind RevisionKind `json:"kind,omitempty"` Draft bool `json:"draft,omitempty"` Number int `json:"_number"` Created Timestamp `json:"created"`