From 264f8cb7714776b6b99294fd35726fcbef3a1040 Mon Sep 17 00:00:00 2001 From: Rob Earhart Date: Wed, 26 Aug 2015 13:08:28 -0700 Subject: [PATCH] gerrit: Add additional RevisionInfo fields Adds fields for the 'draft' flag, patch set number, and revision uploader. Change-Id: I3780e2df046d9fe1065a6dc1b39400b4ea049d3a Reviewed-on: https://go-review.googlesource.com/13936 Reviewed-by: Brad Fitzpatrick --- gerrit/gerrit.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gerrit/gerrit.go b/gerrit/gerrit.go index c1bce66d..c674984b 100644 --- a/gerrit/gerrit.go +++ b/gerrit/gerrit.go @@ -215,11 +215,14 @@ type ApprovalInfo struct { // obtained by adding o parameters as described at: // https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#list-changes type RevisionInfo struct { - Commit *CommitInfo `json:"commit"` - Files map[string]*FileInfo `json:"files"` - Created TimeStamp `json:"created"` - Ref string `json:"ref"` - Fetch map[string]*FetchInfo `json:"fetch"` + Draft bool `json:"draft"` + PatchSetNumber int `json:"_number"` + Created TimeStamp `json:"created"` + Uploader *AccountInfo `json:"uploader"` + Ref string `json:"ref"` + Fetch map[string]*FetchInfo `json:"fetch"` + Commit *CommitInfo `json:"commit"` + Files map[string]*FileInfo `json:"files"` // TODO: more }