Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangeDiff ¶
type ChangeDiff struct {
// contains filtered or unexported fields
}
ChangeDiff is a diff service for Gerrit changes.
func NewChangeDiff ¶
func NewChangeDiff(cli *gerrit.Client, branch, changeID string) (*ChangeDiff, error)
NewChangeDiff returns a new ChangeDiff service, it needs git command in $PATH.
func (*ChangeDiff) Diff ¶
func (g *ChangeDiff) Diff(ctx context.Context) ([]byte, error)
Diff returns a diff of MergeRequest. It runs `git diff` locally instead of diff_url of GitLab Merge Request because diff of diff_url is not suited for comment API in a sense that diff of diff_url is equivalent to `git diff --no-renames`, we want diff which is equivalent to `git diff --find-renames`.
type ChangeReviewCommenter ¶
type ChangeReviewCommenter struct {
// contains filtered or unexported fields
}
ChangeReviewCommenter is a comment service for Gerrit Change Review API:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-review POST /changes/{change-id}/revisions/{revision-id}/review
func NewChangeReviewCommenter ¶
func NewChangeReviewCommenter(cli *gerrit.Client, changeID, revisionID string) (*ChangeReviewCommenter, error)
NewChangeReviewCommenter returns a new NewChangeReviewCommenter service. ChangeReviewCommenter service needs git command in $PATH.