gerrit: add Client.AbandonChange
Change-Id: Ic48abd39a8a68de058595077082902f57577ce6d
Reviewed-on: https://go-review.googlesource.com/19312
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/gerrit/gerrit.go b/gerrit/gerrit.go
index 38b0705..be1aab7 100644
--- a/gerrit/gerrit.go
+++ b/gerrit/gerrit.go
@@ -328,6 +328,12 @@
nil, review)
}
+// AbandonChange abandons the given change.
+func (c *Client) AbandonChange(changeID string) error {
+ var change ChangeInfo
+ return c.do(&change, "POST", "/changes/"+changeID+"/abandon", nil, nil)
+}
+
// GetAccountInfo gets the specified account's information from Gerrit.
// For the API call, see https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#get-account
// The accountID is https://gerrit-review.googlesource.com/Documentation/rest-api-accounts.html#account-id