Documentation
¶
Index ¶
- func LoadIndex() (*models.GitLabIndex, error)
- func SaveIndex(idx *models.GitLabIndex) error
- type Client
- func (c *Client) AddMergeRequestDiscussionReply(projectID any, mrIID int, discussionID, body string) error
- func (c *Client) ApproveMergeRequest(projectID any, mrIID int) error
- func (c *Client) CloseMergeRequest(projectID any, mrIID int) error
- func (c *Client) CreateMergeRequest(projectID any, opts CreateMergeRequestOptions) (*models.MergeRequestDetail, error)
- func (c *Client) CreateMergeRequestInlineComment(projectID any, mrIID int, opts InlineCommentOptions) error
- func (c *Client) CreateMergeRequestNote(projectID any, mrIID int, body string) error
- func (c *Client) CreateMergeRequestNoteReaction(projectID any, mrIID int, noteID int, emoji string) error
- func (c *Client) CreateMergeRequestReaction(projectID any, mrIID int, emoji string) error
- func (c *Client) GetActiveProjects(since time.Time) ([]*gitlab.Project, error)
- func (c *Client) GetCommit(projectID interface{}, sha string) (*models.CommitDetail, error)
- func (c *Client) GetCommits(projectID int, since time.Time) ([]models.Commit, error)
- func (c *Client) GetMergeRequest(projectID interface{}, mrIID int) (*models.MergeRequestDetail, error)
- func (c *Client) GetMergeRequestChanges(projectID any, mrIID int, includeDiff bool) ([]models.MRFile, error)
- func (c *Client) GetMergeRequestCommits(projectID any, mrIID int) ([]models.MRCommit, error)
- func (c *Client) GetMergeRequestDiffVersions(projectID any, mrIID int) (*models.MRDiffVersion, error)
- func (c *Client) GetMergeRequestDiscussions(projectID any, mrIID int) ([]models.MRDiscussion, error)
- func (c *Client) GetMergeRequestNotes(projectID any, mrIID int) ([]models.MRNote, error)
- func (c *Client) GetMergeRequests(projectID int, since time.Time) ([]models.MergeRequest, error)
- func (c *Client) GetProjectMetadata(idOrPath string) (*models.ProjectMetadata, error)
- func (c *Client) GetTags(projectID int, since time.Time) ([]models.Tag, error)
- func (c *Client) IndexAllProjects(gitlabURL string, progressFn ProgressFunc) (*models.GitLabIndex, error)
- func (c *Client) ListMergeRequests(opts ListMergeRequestsOptions) ([]models.MergeRequestDetail, error)
- func (c *Client) ListProjects(opts ListProjectsOptions) ([]*gitlab.Project, error)
- func (c *Client) MergeMergeRequest(projectID any, mrIID int, opts MergeMergeRequestOptions) error
- func (c *Client) TestAuth() (*gitlab.User, error)
- type CreateMergeRequestOptions
- type InlineCommentOptions
- type ListMergeRequestsOptions
- type ListProjectsOptions
- type MergeMergeRequestOptions
- type ProgressFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadIndex ¶
func LoadIndex() (*models.GitLabIndex, error)
func SaveIndex ¶
func SaveIndex(idx *models.GitLabIndex) error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AddMergeRequestDiscussionReply ¶
func (c *Client) AddMergeRequestDiscussionReply(projectID any, mrIID int, discussionID, body string) error
AddMergeRequestDiscussionReply adds a reply to an existing discussion thread
func (*Client) ApproveMergeRequest ¶
ApproveMergeRequest approves a merge request
func (*Client) CloseMergeRequest ¶
CloseMergeRequest closes a merge request
func (*Client) CreateMergeRequest ¶
func (c *Client) CreateMergeRequest(projectID any, opts CreateMergeRequestOptions) (*models.MergeRequestDetail, error)
CreateMergeRequest creates a new merge request and returns its details
func (*Client) CreateMergeRequestInlineComment ¶
func (c *Client) CreateMergeRequestInlineComment(projectID any, mrIID int, opts InlineCommentOptions) error
CreateMergeRequestInlineComment creates an inline comment on a specific file/line
func (*Client) CreateMergeRequestNote ¶
CreateMergeRequestNote adds a comment/note to a merge request
func (*Client) CreateMergeRequestNoteReaction ¶
func (c *Client) CreateMergeRequestNoteReaction(projectID any, mrIID int, noteID int, emoji string) error
CreateMergeRequestNoteReaction adds an emoji reaction to a note/comment on a merge request
func (*Client) CreateMergeRequestReaction ¶
CreateMergeRequestReaction adds an emoji reaction to a merge request
func (*Client) GetActiveProjects ¶
func (*Client) GetCommit ¶
func (c *Client) GetCommit(projectID interface{}, sha string) (*models.CommitDetail, error)
GetCommit fetches detailed information about a single commit
func (*Client) GetCommits ¶
func (*Client) GetMergeRequest ¶
func (c *Client) GetMergeRequest(projectID interface{}, mrIID int) (*models.MergeRequestDetail, error)
GetMergeRequest fetches a single merge request with full details
func (*Client) GetMergeRequestChanges ¶
func (c *Client) GetMergeRequestChanges(projectID any, mrIID int, includeDiff bool) ([]models.MRFile, error)
GetMergeRequestChanges fetches the list of files changed in a merge request
func (*Client) GetMergeRequestCommits ¶
GetMergeRequestCommits fetches commits associated with a merge request
func (*Client) GetMergeRequestDiffVersions ¶
func (c *Client) GetMergeRequestDiffVersions(projectID any, mrIID int) (*models.MRDiffVersion, error)
GetMergeRequestDiffVersions fetches the diff version info needed for inline comments
func (*Client) GetMergeRequestDiscussions ¶
func (c *Client) GetMergeRequestDiscussions(projectID any, mrIID int) ([]models.MRDiscussion, error)
GetMergeRequestDiscussions fetches all discussions/threads on a merge request
func (*Client) GetMergeRequestNotes ¶
GetMergeRequestNotes fetches all notes/comments on a merge request
func (*Client) GetMergeRequests ¶
func (*Client) GetProjectMetadata ¶
func (c *Client) GetProjectMetadata(idOrPath string) (*models.ProjectMetadata, error)
func (*Client) IndexAllProjects ¶
func (c *Client) IndexAllProjects(gitlabURL string, progressFn ProgressFunc) (*models.GitLabIndex, error)
func (*Client) ListMergeRequests ¶
func (c *Client) ListMergeRequests(opts ListMergeRequestsOptions) ([]models.MergeRequestDetail, error)
ListMergeRequests fetches merge requests based on options
func (*Client) ListProjects ¶
func (c *Client) ListProjects(opts ListProjectsOptions) ([]*gitlab.Project, error)
ListProjects returns projects with configurable sorting and limit
func (*Client) MergeMergeRequest ¶
func (c *Client) MergeMergeRequest(projectID any, mrIID int, opts MergeMergeRequestOptions) error
MergeMergeRequest merges (accepts) a merge request
type CreateMergeRequestOptions ¶
type CreateMergeRequestOptions struct {
Title string
Description string
SourceBranch string
TargetBranch string
Draft bool
RemoveSourceBranch bool
Squash bool
}
CreateMergeRequestOptions contains options for creating a merge request
type InlineCommentOptions ¶
type InlineCommentOptions struct {
Body string
NewPath string
OldPath string
NewLine int
OldLine int
}
InlineCommentOptions contains options for creating an inline/diff comment
type ListMergeRequestsOptions ¶
type ListMergeRequestsOptions struct {
State string // opened, closed, merged, all
Scope string // created_by_me, assigned_to_me, all
Limit int
OrderBy string // created_at, updated_at
Sort string // asc, desc
ProjectID string // optional - filter to specific project
IncludeWIP bool // include WIP/draft MRs (excluded by default)
ConflictsOnly bool // only show MRs with conflicts
}
ListMergeRequestsOptions configures the MR list query
type ListProjectsOptions ¶
type ListProjectsOptions struct {
Limit int // Maximum number of projects to return (0 = all)
OrderBy string // Sort field: "created_at", "last_activity_at", "name", "path", "id"
Sort string // Sort direction: "asc" or "desc"
}
ListProjectsOptions configures the ListProjects call
type MergeMergeRequestOptions ¶
type MergeMergeRequestOptions struct {
Squash bool
RemoveSourceBranch bool
MergeWhenPipelineSucceeds bool
MergeCommitMessage string
SquashCommitMessage string
}
MergeMergeRequestOptions contains options for merging a merge request
type ProgressFunc ¶
type ProgressFunc func(completed, total int)