groupmilestones

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package groupmilestones implements GitLab group milestone operations including list, get, create, update, delete, and related resource retrieval (issues, merge requests, burndown chart events).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error

Delete removes a group milestone.

func FormatBurndownChartEventsMarkdown

func FormatBurndownChartEventsMarkdown(out BurndownChartEventsOutput) *mcp.CallToolResult

FormatBurndownChartEventsMarkdown renders burndown chart events as an MCP Markdown result.

func FormatBurndownChartEventsMarkdownString

func FormatBurndownChartEventsMarkdownString(out BurndownChartEventsOutput) string

FormatBurndownChartEventsMarkdownString renders burndown chart events as a Markdown table string.

func FormatIssuesMarkdown

func FormatIssuesMarkdown(out IssuesOutput) *mcp.CallToolResult

FormatIssuesMarkdown renders a paginated list of milestone issues as an MCP Markdown result.

func FormatIssuesMarkdownString

func FormatIssuesMarkdownString(out IssuesOutput) string

FormatIssuesMarkdownString renders a paginated list of milestone issues as a Markdown table string.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) *mcp.CallToolResult

FormatListMarkdown renders a paginated list of group milestones as an MCP Markdown result.

func FormatListMarkdownString

func FormatListMarkdownString(out ListOutput) string

FormatListMarkdownString renders a paginated list of group milestones as a Markdown table string.

func FormatMarkdown

func FormatMarkdown(v Output) string

FormatMarkdown renders a single group milestone as a Markdown string.

func FormatMergeRequestsMarkdown

func FormatMergeRequestsMarkdown(out MergeRequestsOutput) *mcp.CallToolResult

FormatMergeRequestsMarkdown renders a paginated list of milestone MRs as an MCP Markdown result.

func FormatMergeRequestsMarkdownString

func FormatMergeRequestsMarkdownString(out MergeRequestsOutput) string

FormatMergeRequestsMarkdownString renders a paginated list of milestone MRs as a Markdown table string.

func RegisterMeta

func RegisterMeta(server *mcp.Server, client *gitlabclient.Client)

RegisterMeta registers the group milestone meta-tool on the MCP server.

func RegisterTools

func RegisterTools(server *mcp.Server, client *gitlabclient.Client)

RegisterTools registers group milestone tools on the MCP server.

Types

type BurndownChartEventItem

type BurndownChartEventItem struct {
	CreatedAt string `json:"created_at"`
	Weight    int64  `json:"weight"`
	Action    string `json:"action"`
}

BurndownChartEventItem represents a single burndown chart event.

type BurndownChartEventsOutput

type BurndownChartEventsOutput struct {
	toolutil.HintableOutput
	Events     []BurndownChartEventItem  `json:"events"`
	Pagination toolutil.PaginationOutput `json:"pagination"`
}

BurndownChartEventsOutput holds a paginated list of burndown chart events.

func GetBurndownChartEvents

func GetBurndownChartEvents(ctx context.Context, client *gitlabclient.Client, input GetBurndownChartEventsInput) (BurndownChartEventsOutput, error)

GetBurndownChartEvents retrieves burndown chart events for a group milestone.

type CreateInput

type CreateInput struct {
	GroupID     toolutil.StringOrInt `json:"group_id"              jsonschema:"Group ID or URL-encoded path,required"`
	Title       string               `json:"title"                 jsonschema:"Milestone title,required"`
	Description string               `json:"description,omitempty" jsonschema:"Milestone description"`
	StartDate   string               `json:"start_date,omitempty"  jsonschema:"Start date (YYYY-MM-DD)"`
	DueDate     string               `json:"due_date,omitempty"    jsonschema:"Due date (YYYY-MM-DD)"`
}

CreateInput defines parameters for creating a group milestone.

type DeleteInput

type DeleteInput struct {
	GroupID      toolutil.StringOrInt `json:"group_id"       jsonschema:"Group ID or URL-encoded path,required"`
	MilestoneIID int64                `json:"milestone_iid"  jsonschema:"Milestone IID (group-scoped). Use gitlab_group_milestone_list to find IIDs,required"`
}

DeleteInput defines parameters for deleting a group milestone.

type GetBurndownChartEventsInput

type GetBurndownChartEventsInput struct {
	GroupID      toolutil.StringOrInt `json:"group_id"       jsonschema:"Group ID or URL-encoded path,required"`
	MilestoneIID int64                `json:"milestone_iid"  jsonschema:"Milestone IID (group-scoped). Use gitlab_group_milestone_list to find IIDs,required"`
	toolutil.PaginationInput
}

GetBurndownChartEventsInput defines parameters for listing burndown chart events for a group milestone.

type GetInput

type GetInput struct {
	GroupID      toolutil.StringOrInt `json:"group_id"       jsonschema:"Group ID or URL-encoded path,required"`
	MilestoneIID int64                `json:"milestone_iid"  jsonschema:"Milestone IID (group-scoped). Use gitlab_group_milestone_list to find IIDs,required"`
}

GetInput defines parameters for getting a single group milestone.

type GetIssuesInput

type GetIssuesInput struct {
	GroupID      toolutil.StringOrInt `json:"group_id"       jsonschema:"Group ID or URL-encoded path,required"`
	MilestoneIID int64                `json:"milestone_iid"  jsonschema:"Milestone IID (group-scoped). Use gitlab_group_milestone_list to find IIDs,required"`
	toolutil.PaginationInput
}

GetIssuesInput defines parameters for listing issues assigned to a group milestone.

type GetMergeRequestsInput

type GetMergeRequestsInput struct {
	GroupID      toolutil.StringOrInt `json:"group_id"       jsonschema:"Group ID or URL-encoded path,required"`
	MilestoneIID int64                `json:"milestone_iid"  jsonschema:"Milestone IID (group-scoped). Use gitlab_group_milestone_list to find IIDs,required"`
	toolutil.PaginationInput
}

GetMergeRequestsInput defines parameters for listing merge requests assigned to a group milestone.

type IssueItem

type IssueItem struct {
	ID        int64  `json:"id"`
	IID       int64  `json:"iid"`
	Title     string `json:"title"`
	State     string `json:"state"`
	WebURL    string `json:"web_url"`
	CreatedAt string `json:"created_at"`
}

IssueItem is a simplified issue representation for milestone context.

type IssuesOutput

type IssuesOutput struct {
	toolutil.HintableOutput
	Issues     []IssueItem               `json:"issues"`
	Pagination toolutil.PaginationOutput `json:"pagination"`
}

IssuesOutput holds a paginated list of issues for a group milestone.

func GetIssues

func GetIssues(ctx context.Context, client *gitlabclient.Client, input GetIssuesInput) (IssuesOutput, error)

GetIssues retrieves issues assigned to a group milestone.

type ListInput

type ListInput struct {
	GroupID            toolutil.StringOrInt `json:"group_id"                       jsonschema:"Group ID or URL-encoded path,required"`
	State              string               `json:"state,omitempty"                jsonschema:"Filter by state (active, closed)"`
	Title              string               `json:"title,omitempty"                jsonschema:"Filter by exact milestone title"`
	Search             string               `json:"search,omitempty"               jsonschema:"Search milestones by title or description"`
	SearchTitle        string               `json:"search_title,omitempty"         jsonschema:"Search milestones by title only"`
	IncludeAncestors   bool                 `json:"include_ancestors,omitempty"    jsonschema:"Include milestones from ancestor groups"`
	IncludeDescendants bool                 `json:"include_descendants,omitempty"  jsonschema:"Include milestones from descendant groups"`
	IIDs               []int64              `json:"iids,omitempty"                 jsonschema:"Filter by milestone IIDs"`
	UpdatedBefore      string               `json:"updated_before,omitempty"       jsonschema:"Return milestones updated before date (YYYY-MM-DD)"`
	UpdatedAfter       string               `json:"updated_after,omitempty"        jsonschema:"Return milestones updated after date (YYYY-MM-DD)"`
	ContainingDate     string               `json:"containing_date,omitempty"      jsonschema:"Return milestones containing this date (YYYY-MM-DD)"`
	toolutil.PaginationInput
}

ListInput defines parameters for listing milestones in a GitLab group.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	Milestones []Output                  `json:"milestones"`
	Pagination toolutil.PaginationOutput `json:"pagination"`
}

ListOutput holds a paginated list of group milestones.

func List

func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)

List retrieves a paginated list of milestones for a GitLab group.

type MergeRequestItem

type MergeRequestItem struct {
	ID           int64  `json:"id"`
	IID          int64  `json:"iid"`
	Title        string `json:"title"`
	State        string `json:"state"`
	SourceBranch string `json:"source_branch"`
	TargetBranch string `json:"target_branch"`
	WebURL       string `json:"web_url"`
	CreatedAt    string `json:"created_at"`
}

MergeRequestItem is a simplified merge request representation for milestone context.

type MergeRequestsOutput

type MergeRequestsOutput struct {
	toolutil.HintableOutput
	MergeRequests []MergeRequestItem        `json:"merge_requests"`
	Pagination    toolutil.PaginationOutput `json:"pagination"`
}

MergeRequestsOutput holds a paginated list of merge requests for a group milestone.

func GetMergeRequests

func GetMergeRequests(ctx context.Context, client *gitlabclient.Client, input GetMergeRequestsInput) (MergeRequestsOutput, error)

GetMergeRequests retrieves merge requests assigned to a group milestone.

type Output

type Output struct {
	toolutil.HintableOutput
	ID          int64  `json:"id"`
	IID         int64  `json:"iid"`
	GroupID     int64  `json:"group_id"`
	GroupPath   string `json:"group_path,omitempty"`
	Title       string `json:"title"`
	Description string `json:"description"`
	State       string `json:"state"`
	StartDate   string `json:"start_date"`
	DueDate     string `json:"due_date"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
	Expired     bool   `json:"expired"`
}

Output represents a single group milestone.

func Create

func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (Output, error)

Create creates a new milestone in a GitLab group.

func Get

func Get(ctx context.Context, client *gitlabclient.Client, input GetInput) (Output, error)

Get retrieves a single group milestone by IID.

func Update

func Update(ctx context.Context, client *gitlabclient.Client, input UpdateInput) (Output, error)

Update modifies an existing group milestone. Only non-empty fields are applied.

type UpdateInput

type UpdateInput struct {
	GroupID      toolutil.StringOrInt `json:"group_id"              jsonschema:"Group ID or URL-encoded path,required"`
	MilestoneIID int64                `json:"milestone_iid"         jsonschema:"Milestone IID (group-scoped). Use gitlab_group_milestone_list to find IIDs,required"`
	Title        string               `json:"title,omitempty"       jsonschema:"Milestone title"`
	Description  string               `json:"description,omitempty" jsonschema:"Milestone description"`
	StartDate    string               `json:"start_date,omitempty"  jsonschema:"Start date (YYYY-MM-DD)"`
	DueDate      string               `json:"due_date,omitempty"    jsonschema:"Due date (YYYY-MM-DD)"`
	StateEvent   string               `json:"state_event,omitempty" jsonschema:"State transition: activate or close"`
}

UpdateInput defines parameters for updating a group milestone.

Jump to

Keyboard shortcuts

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