source

package
v0.0.0-...-f4c9d17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitLab

type GitLab struct {
	Client *gitlab.Client
	Repo   *model.Repo
}

func NewGitLabForRepo

func NewGitLabForRepo(tlscfg *tls.Config, httpproxy *url.URL, repo *model.Repo) (*GitLab, error)

func (*GitLab) AcceptMergeRequest

func (gl *GitLab) AcceptMergeRequest(mreq *model.MergeReq, removeSource bool) error

func (*GitLab) AddMergeRequestReply

func (gl *GitLab) AddMergeRequestReply(mreq *model.MergeReq, thread, text string) (model.Comment, error)

func (*GitLab) AddMergeRequestThread

func (gl *GitLab) AddMergeRequestThread(mreq *model.MergeReq, text string, standalone bool, context *model.CommentContext) (model.CommentThread, error)

func (*GitLab) ApproveMergeRequest

func (gl *GitLab) ApproveMergeRequest(mreq *model.MergeReq) error

func (*GitLab) GetCommitDiffs

func (gl *GitLab) GetCommitDiffs(mreq *model.MergeReq, commit *model.Commit) ([]model.Diff, error)

func (*GitLab) GetMergeRequest

func (gl *GitLab) GetMergeRequest(mreq *model.MergeReq) (model.MergeReq, error)

func (*GitLab) GetMergeRequestApprovals

func (gl *GitLab) GetMergeRequestApprovals(mreq *model.MergeReq) (model.Approvals, error)

func (*GitLab) GetMergeRequestThreads

func (gl *GitLab) GetMergeRequestThreads(mreq *model.MergeReq) ([]model.CommentThread, error)

func (*GitLab) GetMergeRequests

func (gl *GitLab) GetMergeRequests(onlyOpen bool, updatedAfter *time.Time) ([]model.MergeReq, error)

func (*GitLab) GetPatches

func (gl *GitLab) GetPatches(mreq *model.MergeReq, series *model.Series) ([]model.Commit, error)

func (*GitLab) GetVersions

func (gl *GitLab) GetVersions(mreq *model.MergeReq) ([]model.Series, error)

func (*GitLab) Ping

func (gl *GitLab) Ping() error

func (*GitLab) ResolveMergeRequestThread

func (gl *GitLab) ResolveMergeRequestThread(mreq *model.MergeReq, thread string, resolved bool) error

func (*GitLab) UnapproveMergeRequest

func (gl *GitLab) UnapproveMergeRequest(mreq *model.MergeReq) error

type Source

type Source interface {
	Ping() error

	GetMergeRequests(onlyOpen bool, updatedAfter *time.Time) ([]model.MergeReq, error)

	GetMergeRequest(mreq *model.MergeReq) (model.MergeReq, error)

	GetVersions(mreq *model.MergeReq) ([]model.Series, error)

	GetPatches(mreq *model.MergeReq, series *model.Series) ([]model.Commit, error)

	GetCommitDiffs(mreq *model.MergeReq, commit *model.Commit) ([]model.Diff, error)

	GetMergeRequestApprovals(mreq *model.MergeReq) (model.Approvals, error)

	GetMergeRequestThreads(mreq *model.MergeReq) ([]model.CommentThread, error)

	AddMergeRequestThread(mreq *model.MergeReq, text string, standalone bool, context *model.CommentContext) (model.CommentThread, error)

	AddMergeRequestReply(mreq *model.MergeReq, thread, text string) (model.Comment, error)

	ResolveMergeRequestThread(mreq *model.MergeReq, thread string, resolved bool) error

	AcceptMergeRequest(mreq *model.MergeReq, removeSource bool) error

	ApproveMergeRequest(mreq *model.MergeReq) error

	UnapproveMergeRequest(mreq *model.MergeReq) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL