Documentation
¶
Index ¶
- type Change
- type Changes
- type Client
- func (g *Client) AddReview(ctx context.Context, changesetID string, revision string, comment string, ...) error
- func (g *Client) GetChange(ctx context.Context, change string) (Change, error)
- func (g *Client) GetCommit(ctx context.Context, changesetID string, commit string) (Commit, error)
- func (g *Client) GetContent(ctx context.Context, project string, ref string, file string) (string, error)
- func (g *Client) QueryChanges(ctx context.Context, condition string) (Changes, error)
- type Commit
- type Message
- type ReviewInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct { Number int `json:"_number"` AttentionSet struct{} `json:"attention_set"` Branch string `json:"branch"` ChangeID string `json:"change_id"` Created string `json:"created"` Deletions int `json:"deletions"` HasReviewStarted bool `json:"has_review_started"` ID string `json:"id"` Insertions int `json:"insertions"` Mergeable bool `json:"mergeable"` MetaRevID string `json:"meta_rev_id"` WorkInProgress bool `json:"work_in_progress"` Private bool `json:"is_private"` Owner struct { AccountID int `json:"_account_id"` } `json:"owner"` Project string `json:"project"` Requirements []interface{} `json:"requirements"` Status string `json:"status"` Subject string `json:"subject"` Revisions map[string]struct { Number int `json:"_number"` Created string `json:"created"` Fetch struct { AnonymousHTTP struct { Ref string `json:"ref"` URL string `json:"url"` } `json:"anonymous http"` } `json:"fetch"` Kind string `json:"kind"` Ref string `json:"ref"` Uploader struct { AccountID int `json:"_account_id"` } `json:"uploader"` } `json:"revisions"` SubmitRecords []struct { Labels []struct { AppliedBy struct { AccountID int `json:"_account_id"` } `json:"applied_by,omitempty"` Label string `json:"label"` Status string `json:"status"` } `json:"labels"` RuleName string `json:"rule_name"` Status string `json:"status"` } `json:"submit_records"` SubmitType string `json:"submit_type"` TotalCommentCount int `json:"total_comment_count"` UnresolvedCommentCount int `json:"unresolved_comment_count"` Updated string `json:"updated"` Labels map[string]struct { All []struct { AccountID string `json:"account_id"` Value int `json:"value"` } `json:"all"` } `json:"labels"` Messages []Message `json:"messages"` CurrentRevision string `json:"current_revision"` }
Change is a descriptor for a gerrit patch.
func (Change) LabelCount ¶
LabelCount counts the number of labels with specific value (eg. Verified=+1).
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Gerrit Rest client.
func (*Client) AddReview ¶
func (g *Client) AddReview(ctx context.Context, changesetID string, revision string, comment string, tag string) error
AddReview adds a new review (comment + vote) to a change.
type Message ¶
type Message struct { ID string `json:"id"` Tag string `json:"tag"` Message string `json:"message"` RevisionNumber int `json:"_revision_number"` }
Message is a comment added to review (eg. build started...).
type ReviewInput ¶
ReviewInput is a REST request for adding reviews.
Click to show internal directories.
Click to hide internal directories.