Documentation
¶
Index ¶
- func FindTerraCIComment(notes []*gitlab.Note) *gitlab.Note
- type Client
- func (c *Client) AddMRLabels(projectID string, mrIID int64, labels []string) error
- func (c *Client) BaseURL() string
- func (c *Client) CreateMRNote(projectID string, mrIID int64, body string) (*gitlab.Note, error)
- func (c *Client) GetMRNotes(projectID string, mrIID int64) ([]*gitlab.Note, error)
- func (c *Client) HasToken() bool
- func (c *Client) UpdateMRNote(projectID string, mrIID, noteID int64, body string) (*gitlab.Note, error)
- type Context
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the official GitLab client.
func NewClientFromEnv ¶
func NewClientFromEnv() *Client
NewClientFromEnv creates a client from GitLab CI environment variables.
func (*Client) AddMRLabels ¶
AddMRLabels adds labels to an MR.
func (*Client) CreateMRNote ¶
CreateMRNote creates a new note on an MR.
func (*Client) GetMRNotes ¶
GetMRNotes retrieves all notes for an MR.
type Context ¶
type Context struct {
ProjectID string
ProjectPath string
MRIID int64
SourceBranch string
TargetBranch string
PipelineID string
JobID string
CommitSHA string
InMR bool
}
Context contains information about the current MR context.
func DetectContext ¶
func DetectContext() *Context
DetectContext detects if we're running in a GitLab MR pipeline.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles MR-related comment operations.
func NewService ¶
NewService creates a new MR service with injected dependencies.
func NewServiceFromEnv ¶
NewServiceFromEnv creates a new MR service with dependencies from environment.
Click to show internal directories.
Click to hide internal directories.