groupboards

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package groupboards implements MCP tools for GitLab group issue board operations.

The package wraps the GitLab Group issue boards API:

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionSpecs

func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec

ActionSpecs returns canonical specs for group issue board actions.

func DeleteGroupBoard

func DeleteGroupBoard(ctx context.Context, client *gitlabclient.Client, input DeleteGroupBoardInput) error

DeleteGroupBoard deletes a group issue board.

func DeleteGroupBoardList

func DeleteGroupBoardList(ctx context.Context, client *gitlabclient.Client, input DeleteGroupBoardListInput) error

DeleteGroupBoardList deletes a group board list.

func FormatBoardListMarkdown

func FormatBoardListMarkdown(out BoardListOutput) string

FormatBoardListMarkdown formats a single board list as markdown.

func FormatGroupBoardMarkdown

func FormatGroupBoardMarkdown(out GroupBoardOutput) string

FormatGroupBoardMarkdown formats a single group board as markdown.

func FormatListBoardListsMarkdown

func FormatListBoardListsMarkdown(out ListBoardListsOutput) string

FormatListBoardListsMarkdown formats a paginated list of board lists.

func FormatListGroupBoardsMarkdown

func FormatListGroupBoardsMarkdown(out ListGroupBoardsOutput) string

FormatListGroupBoardsMarkdown formats a paginated list of group boards.

Types

type BasicUserOutput added in v2.3.0

type BasicUserOutput struct {
	ID        int64  `json:"id"`
	Username  string `json:"username"`
	Name      string `json:"name"`
	State     string `json:"state"`
	AvatarURL string `json:"avatar_url"`
	WebURL    string `json:"web_url"`
}

BasicUserOutput is a documented reference subset per doc/api/group_boards.md. The board's `assignee` object in the documented update-board response shows only id, name, username, state, avatar_url, and web_url; gl.BasicUser's created_at is not part of the documented board assignee shape. The board-level assignee is decoded via the raw-superset fetch path (groupIssueBoardAPI), as gl.GroupIssueBoard omits the assignee field entirely.

type BoardListAssigneeOutput added in v2.3.0

type BoardListAssigneeOutput struct {
	ID       int64  `json:"id"`
	Name     string `json:"name"`
	Username string `json:"username"`
}

BoardListAssigneeOutput is a documented reference subset per doc/api/group_boards.md. A board list's `assignee` object (Premium/Ultimate assignee list type) is surfaced with id, name, and username, matching the compact gl.BoardListAssignee struct. The documented response examples cover only label and milestone lists, so this premium list-type sub-object has no fuller documented shape to trim against.

type BoardListOutput

type BoardListOutput struct {
	toolutil.HintableOutput
	ID             int64                    `json:"id"`
	Assignee       *BoardListAssigneeOutput `json:"assignee,omitempty" tier:"premium"`
	Iteration      *IterationOutput         `json:"iteration,omitempty" tier:"premium"`
	Label          *LabelOutput             `json:"label,omitempty"`
	MaxIssueCount  int64                    `json:"max_issue_count,omitempty"`
	MaxIssueWeight int64                    `json:"max_issue_weight,omitempty"`
	Milestone      *MilestoneOutput         `json:"milestone,omitempty" tier:"premium"`
	Position       int64                    `json:"position"`
}

BoardListOutput represents a single list within a group board. Nested objects (assignee, label, iteration, milestone) mirror the full client-go gl.BoardList sub-objects per the 1:1 audit policy.

func CreateGroupBoardList

func CreateGroupBoardList(ctx context.Context, client *gitlabclient.Client, input CreateGroupBoardListInput) (BoardListOutput, error)

CreateGroupBoardList creates a new group board list.

func GetGroupBoardList

func GetGroupBoardList(ctx context.Context, client *gitlabclient.Client, input GetGroupBoardListInput) (BoardListOutput, error)

GetGroupBoardList retrieves a single group board list.

func UpdateGroupBoardList

func UpdateGroupBoardList(ctx context.Context, client *gitlabclient.Client, input UpdateGroupBoardListInput) (BoardListOutput, error)

UpdateGroupBoardList reorders a group board list. The V2 API returns a slice of board lists; we return the first match.

type CreateGroupBoardInput

type CreateGroupBoardInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	Name    string               `json:"name" jsonschema:"Board name,required"`
}

CreateGroupBoardInput represents input for creating a group board.

type CreateGroupBoardListInput

type CreateGroupBoardListInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	BoardID int64                `json:"board_id" jsonschema:"Board ID,required"`
	LabelID int64                `json:"label_id" jsonschema:"Label ID to create a label list,required"`
}

CreateGroupBoardListInput represents input for creating a group board list.

type DeleteGroupBoardInput

type DeleteGroupBoardInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	BoardID int64                `json:"board_id" jsonschema:"Board ID,required"`
}

DeleteGroupBoardInput represents input for deleting a group board.

type DeleteGroupBoardListInput

type DeleteGroupBoardListInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	BoardID int64                `json:"board_id" jsonschema:"Board ID,required"`
	ListID  int64                `json:"list_id" jsonschema:"Board list ID,required"`
}

DeleteGroupBoardListInput represents input for deleting a group board list.

type GetGroupBoardInput

type GetGroupBoardInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	BoardID int64                `json:"board_id" jsonschema:"Board ID,required"`
}

GetGroupBoardInput represents input for getting a single group board.

type GetGroupBoardListInput

type GetGroupBoardListInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	BoardID int64                `json:"board_id" jsonschema:"Board ID,required"`
	ListID  int64                `json:"list_id" jsonschema:"Board list ID,required"`
}

GetGroupBoardListInput represents input for getting a single group board list.

type GroupBoardOutput

type GroupBoardOutput struct {
	toolutil.HintableOutput
	ID              int64                 `json:"id"`
	Name            string                `json:"name"`
	Group           *GroupRefOutput       `json:"group,omitempty"`
	Milestone       *MilestoneOutput      `json:"milestone,omitempty" tier:"premium"`
	Assignee        *BasicUserOutput      `json:"assignee,omitempty" tier:"premium"`
	Weight          int64                 `json:"weight,omitempty" tier:"premium"`
	Labels          []*LabelDetailsOutput `json:"labels,omitempty"`
	HideBacklogList bool                  `json:"hide_backlog_list"`
	HideClosedList  bool                  `json:"hide_closed_list"`
	Lists           []BoardListOutput     `json:"lists,omitempty"`
}

GroupBoardOutput represents a GitLab group issue board. Nested objects (group, milestone, assignee, labels, lists) mirror the documented group_boards.md response sub-objects (see shapes.go). The hide_backlog_list, hide_closed_list, assignee and weight fields are documented by the API but absent from client-go's gl.GroupIssueBoard struct, so they are decoded via the raw-superset fetch path (groupIssueBoardAPI) used by the read/create/update handlers and stay version-tolerant (absent on older instances → zero value, omitted from the envelope).

func CreateGroupBoard

func CreateGroupBoard(ctx context.Context, client *gitlabclient.Client, input CreateGroupBoardInput) (GroupBoardOutput, error)

CreateGroupBoard creates a new group issue board.

func GetGroupBoard

func GetGroupBoard(ctx context.Context, client *gitlabclient.Client, input GetGroupBoardInput) (GroupBoardOutput, error)

GetGroupBoard retrieves a single group issue board.

func UpdateGroupBoard

func UpdateGroupBoard(ctx context.Context, client *gitlabclient.Client, input UpdateGroupBoardInput) (GroupBoardOutput, error)

UpdateGroupBoard updates a group issue board.

type GroupRefOutput added in v2.3.0

type GroupRefOutput struct {
	ID     int64  `json:"id"`
	Name   string `json:"name"`
	WebURL string `json:"web_url,omitempty"`
}

GroupRefOutput is a documented reference subset per doc/api/group_boards.md. Every documented group-board response shows the board's `group` object with only id, name and web_url; gl.Group's remaining administrative, statistics, LDAP/SAML, and runner fields are not part of the documented board group shape.

type IterationOutput added in v2.3.0

type IterationOutput struct {
	ID          int64  `json:"id"`
	IID         int64  `json:"iid"`
	Sequence    int64  `json:"sequence"`
	GroupID     int64  `json:"group_id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	State       int64  `json:"state"`
	WebURL      string `json:"web_url"`
	CreatedAt   string `json:"created_at,omitempty"`
	UpdatedAt   string `json:"updated_at,omitempty"`
	StartDate   string `json:"start_date,omitempty"`
	DueDate     string `json:"due_date,omitempty"`
}

IterationOutput is a documented reference subset per doc/api/group_boards.md. A board list's `iteration` object (Premium/Ultimate iteration list type) mirrors gl.ProjectIteration. The documented response examples cover only label and milestone lists, so this premium list-type sub-object has no fuller documented shape to trim against.

type LabelDetailsOutput added in v2.3.0

type LabelDetailsOutput struct {
	ID          int64  `json:"id"`
	Name        string `json:"name"`
	Color       string `json:"color"`
	Description string `json:"description"`
}

LabelDetailsOutput is a documented reference subset per doc/api/group_boards.md. The board's `labels[]` entries in the documented update-board response show only id, name, color, and description; gl.Label's text_color, counts, subscribed, priority, is_project_label, and archived fields are not part of the documented board labels shape.

type LabelOutput added in v2.3.0

type LabelOutput struct {
	Name        string `json:"name"`
	Color       string `json:"color"`
	Description string `json:"description"`
}

LabelOutput is a documented reference subset per doc/api/group_boards.md. Every documented board-list response shows the list's `label` object with only name, color, and description (no id); gl.Label's remaining fields are not part of the documented board-list label shape.

type ListBoardListsOutput

type ListBoardListsOutput struct {
	toolutil.HintableOutput
	Lists      []BoardListOutput         `json:"lists"`
	Pagination toolutil.PaginationOutput `json:"pagination"`
}

ListBoardListsOutput represents a paginated list of board lists.

func ListGroupBoardLists

func ListGroupBoardLists(ctx context.Context, client *gitlabclient.Client, input ListGroupBoardListsInput) (ListBoardListsOutput, error)

ListGroupBoardLists lists all lists in a group board.

type ListGroupBoardListsInput

type ListGroupBoardListsInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	BoardID int64                `json:"board_id" jsonschema:"Board ID,required"`
	OrderBy string               `json:"order_by,omitempty" jsonschema:"Column to order results by (keyset pagination)"`
	Sort    string               `json:"sort,omitempty" jsonschema:"Sort direction (asc, desc)"`
	toolutil.PaginationInput
	toolutil.KeysetPaginationInput
}

ListGroupBoardListsInput represents input for listing group board lists.

type ListGroupBoardsInput

type ListGroupBoardsInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	OrderBy string               `json:"order_by,omitempty" jsonschema:"Column to order results by (keyset pagination)"`
	Sort    string               `json:"sort,omitempty" jsonschema:"Sort direction (asc, desc)"`
	toolutil.PaginationInput
	toolutil.KeysetPaginationInput
}

ListGroupBoardsInput represents input for listing group issue boards.

type ListGroupBoardsOutput

type ListGroupBoardsOutput struct {
	toolutil.HintableOutput
	Boards     []GroupBoardOutput        `json:"boards"`
	Pagination toolutil.PaginationOutput `json:"pagination"`
}

ListGroupBoardsOutput represents a paginated list of group boards.

func ListGroupBoards

func ListGroupBoards(ctx context.Context, client *gitlabclient.Client, input ListGroupBoardsInput) (ListGroupBoardsOutput, error)

ListGroupBoards lists all issue boards for a group.

type MilestoneOutput added in v2.3.0

type MilestoneOutput struct {
	ID          int64  `json:"id"`
	IID         int64  `json:"iid"`
	GroupID     int64  `json:"group_id"`
	Title       string `json:"title"`
	Description string `json:"description"`
	State       string `json:"state"`
	WebURL      string `json:"web_url"`
	StartDate   string `json:"start_date,omitempty"`
	DueDate     string `json:"due_date,omitempty"`
	CreatedAt   string `json:"created_at,omitempty"`
	UpdatedAt   string `json:"updated_at,omitempty"`
}

MilestoneOutput is a documented reference subset per doc/api/group_boards.md. The board/list `milestone` object surfaces only the fields the documented update-board and create-list responses list (id, iid, group_id, title, description, state, timestamps, dates, web_url); gl.Milestone's project_id and expired are not part of the documented group-board milestone shape.

type UpdateGroupBoardInput

type UpdateGroupBoardInput struct {
	GroupID     toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	BoardID     int64                `json:"board_id" jsonschema:"Board ID,required"`
	Name        string               `json:"name,omitempty" jsonschema:"Board name"`
	AssigneeID  int64                `json:"assignee_id,omitempty" jsonschema:"Assignee user ID"`
	MilestoneID int64                `json:"milestone_id,omitempty" jsonschema:"Milestone ID"`
	Labels      []string             `json:"labels,omitempty" jsonschema:"Board scope labels"`
	Weight      int64                `json:"weight,omitempty" jsonschema:"Board scope weight"`
}

UpdateGroupBoardInput represents input for updating a group board.

type UpdateGroupBoardListInput

type UpdateGroupBoardListInput struct {
	GroupID  toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or path,required"`
	BoardID  int64                `json:"board_id" jsonschema:"Board ID,required"`
	ListID   int64                `json:"list_id" jsonschema:"Board list ID,required"`
	Position int64                `json:"position" jsonschema:"New position of the list,required"`
}

UpdateGroupBoardListInput represents input for updating a group board list.

Jump to

Keyboard shortcuts

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