Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MergeRequestCommitCommenter ¶
type MergeRequestCommitCommenter struct {
// contains filtered or unexported fields
}
MergeRequestCommitCommenter is a comment service for GitLab MergeRequest.
API:
https://docs.gitlab.com/ce/api/commits.html#post-comment-to-commit POST /projects/:id/repository/commits/:sha/comments
func NewGitLabMergeRequestCommitCommenter ¶
func NewGitLabMergeRequestCommitCommenter(cli *gitlab.Client, projectID string, pr int, sha string) (*MergeRequestCommitCommenter, error)
NewGitLabMergeRequestCommitCommenter returns a new MergeRequestCommitCommenter service. MergeRequestCommitCommenter service needs git command in $PATH.
type MergeRequestDiff ¶
type MergeRequestDiff struct {
// contains filtered or unexported fields
}
MergeRequestDiff is a diff service for GitLab MergeRequest.
func NewGitLabMergeRequestDiff ¶
func NewGitLabMergeRequestDiff(cli *gitlab.Client, projectID string, pr int, sha string) (*MergeRequestDiff, error)
NewGitLabMergeRequestDiff returns a new MergeRequestDiff service. itLabMergeRequestDiff service needs git command in $PATH.
func (*MergeRequestDiff) Diff ¶
func (g *MergeRequestDiff) 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`.
func (*MergeRequestDiff) Strip ¶
func (g *MergeRequestDiff) Strip() int
Strip returns 1 as a strip of git diff.
type MergeRequestDiscussionCommenter ¶
type MergeRequestDiscussionCommenter struct {
// contains filtered or unexported fields
}
MergeRequestDiscussionCommenter is a comment and diff service for GitLab MergeRequest.
API:
https://docs.gitlab.com/ee/api/discussions.html#create-new-merge-request-discussion POST /projects/:id/merge_requests/:merge_request_iid/discussions
func NewGitLabMergeRequestDiscussionCommenter ¶
func NewGitLabMergeRequestDiscussionCommenter(cli *gitlab.Client, projectID string, pr int, sha string) (*MergeRequestDiscussionCommenter, error)
NewGitLabMergeRequestDiscussionCommenter returns a new MergeRequestDiscussionCommenter service. MergeRequestDiscussionCommenter service needs git command in $PATH.