gitlab

package
v0.0.0-...-5d910d0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider implements the CodeProvider interface for GitLab

func New

func New(config model.ProviderConfig) (*Provider, error)

New creates a new GitLab provider

func (*Provider) CreateComment

func (p *Provider) CreateComment(ctx context.Context, projectID string, mrIID int, comment *model.Comment) error

CreateComment creates a discussion/comment on a merge request

func (*Provider) GetComments

func (p *Provider) GetComments(ctx context.Context, projectID string, mrIID int) ([]*model.Comment, error)

GetComments retrieves all comments for a merge request

func (*Provider) GetFileContent

func (p *Provider) GetFileContent(ctx context.Context, projectID, filePath, commitSHA string) (string, error)

GetFileContent retrieves the content of a file at a specific commit/SHA

func (*Provider) GetMergeRequest

func (p *Provider) GetMergeRequest(ctx context.Context, projectID string, mrIID int) (*model.MergeRequest, error)

GetMergeRequest retrieves detailed information about a merge request

func (*Provider) GetMergeRequestDiffs

func (p *Provider) GetMergeRequestDiffs(ctx context.Context, projectID string, mrIID int) ([]*model.FileDiff, error)

GetMergeRequestDiffs retrieves the file diffs for a merge request

func (*Provider) GetMergeRequestUpdates

func (p *Provider) GetMergeRequestUpdates(ctx context.Context, projectID string, since time.Time) ([]*model.MergeRequest, error)

GetMergeRequestUpdates retrieves merge requests updated since a specific time

func (*Provider) IsMergeRequestEvent

func (p *Provider) IsMergeRequestEvent(event *model.CodeEvent) bool

IsMergeRequestEvent determines if a webhook event is a merge request event that should be processed

func (*Provider) ListMergeRequests

func (p *Provider) ListMergeRequests(ctx context.Context, projectID string, filter *model.MergeRequestFilter) ([]*model.MergeRequest, error)

ListMergeRequests retrieves multiple merge requests based on filter criteria

func (*Provider) ParseWebhookEvent

func (p *Provider) ParseWebhookEvent(payload []byte) (*model.CodeEvent, error)

ParseWebhookEvent parses a GitLab webhook event

func (*Provider) UpdateComment

func (p *Provider) UpdateComment(ctx context.Context, projectID string, mrIID int, commentID string, newBody string) error

UpdateComment updates an existing comment

func (*Provider) UpdateMergeRequestDescription

func (p *Provider) UpdateMergeRequestDescription(ctx context.Context, projectID string, mrIID int, description string) error

UpdateMergeRequestDescription updates the description of a merge request

func (*Provider) ValidateWebhook

func (p *Provider) ValidateWebhook(payload []byte, signature string) error

ValidateWebhook validates the webhook signature

Jump to

Keyboard shortcuts

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