gitlab

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HeaderPrefix default prefix for note message
	HeaderPrefix = "## cdk diff for"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Notes  NotesService
	Pid    interface{}
	Client *gitlab.Client

	Url            string
	Token          string
	TagID          string
	NoteContent    string
	MergeRequestID int
	DeleteNotes    bool
}

Client Gitlab client configuration

func NewGitlabClient

func NewGitlabClient(config *config.AppConfig, notesMock NotesService) *Client

func (*Client) Authenticate

func (gc *Client) Authenticate()

func (*Client) CreateMergeRequestNote

func (gc *Client) CreateMergeRequestNote() error

func (*Client) GetMergeRequestNote

func (gc *Client) GetMergeRequestNote() (*gitlab.Note, error)

func (*Client) ListMergeRequestNotes

func (gc *Client) ListMergeRequestNotes() ([]*gitlab.Note, error)

type NotesService

type NotesService interface {
	ListMergeRequestNotes(pid interface{}, mergeRequest int, opt *gitlab.ListMergeRequestNotesOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.Note, *gitlab.Response, error)
	DeleteMergeRequestNote(pid interface{}, mergeRequest, note int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	UpdateMergeRequestNote(pid interface{}, mergeRequest, note int, opt *gitlab.UpdateMergeRequestNoteOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Note, *gitlab.Response, error)
	CreateMergeRequestNote(pid interface{}, mergeRequest int, opt *gitlab.CreateMergeRequestNoteOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Note, *gitlab.Response, error)
}

NotesService interface for required Gitlab actions with API

Jump to

Keyboard shortcuts

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