Documentation
¶
Index ¶
- type Provider
- func (p *Provider) CreateComment(ctx context.Context, projectID string, mrIID int, comment *model.Comment) error
- func (p *Provider) GetComments(ctx context.Context, projectID string, mrIID int) ([]*model.Comment, error)
- func (p *Provider) GetFileContent(ctx context.Context, projectID, filePath, commitSHA string) (string, error)
- func (p *Provider) GetMergeRequest(ctx context.Context, projectID string, mrIID int) (*model.MergeRequest, error)
- func (p *Provider) GetMergeRequestDiffs(ctx context.Context, projectID string, mrIID int) ([]*model.FileDiff, error)
- func (p *Provider) GetMergeRequestUpdates(ctx context.Context, projectID string, since time.Time) ([]*model.MergeRequest, error)
- func (p *Provider) IsMergeRequestEvent(event *model.CodeEvent) bool
- func (p *Provider) ListMergeRequests(ctx context.Context, projectID string, filter *model.MergeRequestFilter) ([]*model.MergeRequest, error)
- func (p *Provider) ParseWebhookEvent(payload []byte) (*model.CodeEvent, error)
- func (p *Provider) UpdateComment(ctx context.Context, projectID string, mrIID int, commentID string, ...) error
- func (p *Provider) UpdateMergeRequestDescription(ctx context.Context, projectID string, mrIID int, description string) error
- func (p *Provider) ValidateWebhook(payload []byte, signature string) error
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 ¶
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 ¶
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