epicissues

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package epicissues implements GitLab epic-issue hierarchy operations using the Work Items GraphQL API. Child issues are managed through the hierarchy widget, supporting listing, assigning, removing, and reordering.

This package was migrated from the deprecated Epics REST API (deprecated GitLab 17.0, removal planned 19.0) to the Work Items GraphQL API per ADR-0009 (progressive GraphQL migration).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatAssignMarkdown

func FormatAssignMarkdown(out AssignOutput, action string) string

FormatAssignMarkdown renders an epic-issue assignment or removal result.

func FormatListMarkdown

func FormatListMarkdown(out ListOutput) string

FormatListMarkdown renders a list of child issues as a Markdown table.

func RegisterTools

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

RegisterTools registers MCP tools for GitLab epic-issue operations.

Types

type AssignInput

type AssignInput struct {
	FullPath         string `json:"full_path"          jsonschema:"Full path of the group that contains the epic,required"`
	IID              int64  `json:"iid"                jsonschema:"Epic IID within the group,required"`
	ChildProjectPath string `json:"child_project_path" jsonschema:"Full project path of the issue to assign (e.g. my-group/my-project),required"`
	ChildIID         int64  `json:"child_iid"          jsonschema:"IID of the issue to assign to the epic,required"`
}

AssignInput defines parameters for assigning an issue to an epic.

type AssignOutput

type AssignOutput struct {
	toolutil.HintableOutput
	EpicGID  string `json:"epic_gid"`
	ChildGID string `json:"child_gid"`
}

AssignOutput represents the result of assigning or removing an issue from an epic.

func Assign

func Assign(ctx context.Context, client *gitlabclient.Client, input AssignInput) (AssignOutput, error)

Assign links an existing issue to an epic via the Work Items GraphQL hierarchy widget.

func Remove

func Remove(ctx context.Context, client *gitlabclient.Client, input RemoveInput) (AssignOutput, error)

Remove unlinks an issue from an epic by clearing the child's parent reference.

type ChildOutput

type ChildOutput struct {
	ID        string   `json:"id"`
	IID       int64    `json:"iid"`
	Title     string   `json:"title"`
	State     string   `json:"state"`
	WebURL    string   `json:"web_url,omitempty"`
	Author    string   `json:"author,omitempty"`
	Labels    []string `json:"labels,omitempty"`
	CreatedAt string   `json:"created_at,omitempty"`
	UpdatedAt string   `json:"updated_at,omitempty"`
}

ChildOutput represents a child work item (issue) within an epic.

type ListInput

type ListInput struct {
	FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group or my-group/sub-group),required"`
	IID      int64  `json:"iid"       jsonschema:"Epic IID within the group,required"`
	toolutil.GraphQLPaginationInput
}

ListInput defines parameters for listing child issues of an epic.

type ListOutput

type ListOutput struct {
	toolutil.HintableOutput
	Issues     []ChildOutput                    `json:"issues"`
	Pagination toolutil.GraphQLPaginationOutput `json:"pagination"`
}

ListOutput holds a paginated list of child issues in an epic.

func List

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

List retrieves child issues of an epic via the Work Items GraphQL hierarchy widget.

func UpdateOrder

func UpdateOrder(ctx context.Context, client *gitlabclient.Client, input UpdateInput) (ListOutput, error)

UpdateOrder reorders an issue within an epic by moving it relative to another issue.

type RemoveInput

type RemoveInput struct {
	FullPath         string `json:"full_path"          jsonschema:"Full path of the group that contains the epic,required"`
	IID              int64  `json:"iid"                jsonschema:"Epic IID within the group,required"`
	ChildProjectPath string `json:"child_project_path" jsonschema:"Full project path of the issue to remove,required"`
	ChildIID         int64  `json:"child_iid"          jsonschema:"IID of the issue to remove from the epic,required"`
}

RemoveInput defines parameters for removing an issue from an epic.

type UpdateInput

type UpdateInput struct {
	FullPath         string `json:"full_path"                   jsonschema:"Full path of the group that contains the epic,required"`
	IID              int64  `json:"iid"                         jsonschema:"Epic IID within the group,required"`
	ChildID          string `json:"child_id"                    jsonschema:"Work item GID of the issue to reorder (from list output id field),required"`
	AdjacentID       string `json:"adjacent_id,omitempty"       jsonschema:"Work item GID of the reference issue to position relative to"`
	RelativePosition string `json:"relative_position,omitempty" jsonschema:"Position relative to adjacent item: BEFORE or AFTER"`
}

UpdateInput defines parameters for reordering an issue within an epic.

Jump to

Keyboard shortcuts

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