diff options
author | Florian Klink <flokli@flokli.de> | 2019-12-03T09·16+0100 |
---|---|---|
committer | Florian Klink <flokli@flokli.de> | 2019-12-03T09·16+0100 |
commit | 5acc403e28c8aeaef7583995c1e7cd6332111973 (patch) | |
tree | fb65b039b1ca41a35a0b439eea1fa0d4863e50c9 /gerrit/changeset.go | |
parent | 0e8aa14045ea9873e7b4aa7aadb1d4da2e54193a (diff) |
changeset: fetch SUBMITTABLE and add field to struct
Diffstat (limited to 'gerrit/changeset.go')
-rw-r--r-- | gerrit/changeset.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gerrit/changeset.go b/gerrit/changeset.go index 71310a712514..0a0a607cd611 100644 --- a/gerrit/changeset.go +++ b/gerrit/changeset.go @@ -16,6 +16,7 @@ type Changeset struct { Number int Verified int CodeReviewed int + Submittable bool HashTags []string CommitID string ParentCommitIDs []string @@ -31,6 +32,7 @@ func MakeChangeset(changeInfo *goGerrit.ChangeInfo) *Changeset { Number: changeInfo.Number, Verified: labelInfoToInt(changeInfo.Labels["Verified"]), CodeReviewed: labelInfoToInt(changeInfo.Labels["Code-Review"]), + Submittable: changeInfo.Submittable, HashTags: changeInfo.Hashtags, CommitID: changeInfo.CurrentRevision, // yes, this IS the commit ID. ParentCommitIDs: getParentCommitIDs(changeInfo), @@ -65,7 +67,8 @@ func (c *Changeset) IsCodeReviewed() bool { func (c *Changeset) String() string { var b bytes.Buffer b.WriteString("Changeset") - b.WriteString(fmt.Sprintf("(commitID: %.7s, author: %s, subject: %s)", c.CommitID, c.OwnerName, c.Subject)) + b.WriteString(fmt.Sprintf("(commitID: %.7s, author: %s, subject: %s, submittable: %v)", + c.CommitID, c.OwnerName, c.Subject, c.Submittable)) return b.String() } |