boards

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: 7 Imported by: 0

Documentation

Overview

Package boards implements MCP tools for GitLab project issue board operations.

The package wraps the GitLab 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 project issue board actions.

func DeleteBoard

func DeleteBoard(ctx context.Context, client *gitlabclient.Client, input DeleteBoardInput) error

DeleteBoard deletes an issue board.

func DeleteBoardList

func DeleteBoardList(ctx context.Context, client *gitlabclient.Client, input DeleteBoardListInput) error

DeleteBoardList deletes a board list.

func FormatBoardListMarkdown

func FormatBoardListMarkdown(out BoardListOutput) string

FormatBoardListMarkdown formats a single board list as markdown.

func FormatBoardMarkdown

func FormatBoardMarkdown(out BoardOutput) string

FormatBoardMarkdown formats a single board as markdown.

func FormatListBoardListsMarkdown

func FormatListBoardListsMarkdown(out ListBoardListsOutput) string

FormatListBoardListsMarkdown formats a paginated list of board lists.

func FormatListBoardsMarkdown

func FormatListBoardsMarkdown(out ListBoardsOutput) string

FormatListBoardsMarkdown formats a paginated list of 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/boards.md. The board's `assignee` object surfaces only the fields the documented update-board response lists (id, name, username, state, avatar_url, web_url); gl.BasicUser's created_at is not part of the documented board assignee shape.

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/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 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"`
	Label          *LabelOutput             `json:"label,omitempty"`
	Assignee       *BoardListAssigneeOutput `json:"assignee,omitempty" tier:"premium"`
	Milestone      *MilestoneOutput         `json:"milestone,omitempty" tier:"premium"`
	Iteration      *IterationOutput         `json:"iteration,omitempty" tier:"premium"`
	Position       int64                    `json:"position"`
	MaxIssueCount  int64                    `json:"max_issue_count,omitempty"`
	MaxIssueWeight int64                    `json:"max_issue_weight,omitempty"`
	// LimitMetric is the documented REST `limit_metric` field on each board list
	// (all_metrics / issue_count / issue_weights, or null). The client-go
	// gl.BoardList struct omits it, so it is decoded via the raw-superset fetch
	// path (boardListAPI) used by the board get / list-board-lists read handlers.
	LimitMetric string `json:"limit_metric,omitempty"`
}

BoardListOutput represents a single list within a board. Sub-objects (label, assignee, milestone, iteration) mirror the client-go gl.BoardList struct on their canonical json keys (1:1 audit policy: full nested objects).

func CreateBoardList

func CreateBoardList(ctx context.Context, client *gitlabclient.Client, input CreateBoardListInput) (BoardListOutput, error)

CreateBoardList creates a new board list.

func GetBoardList

func GetBoardList(ctx context.Context, client *gitlabclient.Client, input GetBoardListInput) (BoardListOutput, error)

GetBoardList retrieves a single board list.

func UpdateBoardList

func UpdateBoardList(ctx context.Context, client *gitlabclient.Client, input UpdateBoardListInput) (BoardListOutput, error)

UpdateBoardList reorders a board list.

type BoardOutput

type BoardOutput struct {
	toolutil.HintableOutput
	ID              int64                 `json:"id"`
	Name            string                `json:"name"`
	Project         *ProjectOutput        `json:"project,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"`
}

BoardOutput represents a GitLab issue board. Sub-objects (project, milestone, assignee, labels, lists) mirror the client-go gl.IssueBoard struct field for field on their canonical json keys (1:1 audit policy: full nested objects).

func CreateBoard

func CreateBoard(ctx context.Context, client *gitlabclient.Client, input CreateBoardInput) (BoardOutput, error)

CreateBoard creates a new issue board.

func GetBoard

func GetBoard(ctx context.Context, client *gitlabclient.Client, input GetBoardInput) (BoardOutput, error)

GetBoard retrieves a single issue board.

func UpdateBoard

func UpdateBoard(ctx context.Context, client *gitlabclient.Client, input UpdateBoardInput) (BoardOutput, error)

UpdateBoard updates an existing issue board.

type CreateBoardInput

type CreateBoardInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
	Name      string               `json:"name" jsonschema:"Board name,required"`
}

CreateBoardInput represents input for creating a board.

type CreateBoardListInput

type CreateBoardListInput struct {
	ProjectID   toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
	BoardID     int64                `json:"board_id" jsonschema:"Board ID,required"`
	LabelID     int64                `json:"label_id,omitempty" jsonschema:"Label ID to create a label list"`
	AssigneeID  int64                `json:"assignee_id,omitempty" jsonschema:"Assignee ID to create an assignee list"`
	MilestoneID int64                `json:"milestone_id,omitempty" jsonschema:"Milestone ID to create a milestone list"`
	IterationID int64                `json:"iteration_id,omitempty" jsonschema:"Iteration ID to create an iteration list"`
}

CreateBoardListInput represents input for creating a board list.

type DeleteBoardInput

type DeleteBoardInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
	BoardID   int64                `json:"board_id" jsonschema:"Board ID,required"`
}

DeleteBoardInput represents input for deleting a board.

type DeleteBoardListInput

type DeleteBoardListInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
	BoardID   int64                `json:"board_id" jsonschema:"Board ID,required"`
	ListID    int64                `json:"list_id" jsonschema:"Board list ID,required"`
}

DeleteBoardListInput represents input for deleting a board list.

type GetBoardInput

type GetBoardInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
	BoardID   int64                `json:"board_id" jsonschema:"Board ID,required"`
}

GetBoardInput represents input for getting a single board.

type GetBoardListInput

type GetBoardListInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or path,required"`
	BoardID   int64                `json:"board_id" jsonschema:"Board ID,required"`
	ListID    int64                `json:"list_id" jsonschema:"Board list ID,required"`
}

GetBoardListInput represents input for getting a single board list.

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/boards.md. A board list's `iteration` object (Premium/Ultimate iteration list type) mirrors gl.ProjectIteration. The documented response examples cover only label 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/boards.md. The board's `labels[]` entries in the documented update-board response show only id, name, color, and description; gl.LabelDetails's description_html and text_color 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/boards.md. Every documented board-list response shows the list's `label` object with only name, color, and description; gl.Label's id, text_color, counts, subscribed, priority, is_project_label, and archived fields are not part of the documented board-list label shape.

type ListBoardListsInput

type ListBoardListsInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id"         jsonschema:"Project 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 for keyset pagination (e.g. id, created_at, updated_at)"`
	Sort      string               `json:"sort,omitempty"     jsonschema:"Sort direction (asc, desc)"`
	toolutil.PaginationInput
	toolutil.KeysetPaginationInput
}

ListBoardListsInput represents input for listing board lists. OrderBy/Sort/pagination/page_token map onto the embedded gl.ListOptions to mirror the SDK's keyset-capable list options.

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 ListBoardLists

func ListBoardLists(ctx context.Context, client *gitlabclient.Client, input ListBoardListsInput) (ListBoardListsOutput, error)

ListBoardLists lists all lists in a board.

type ListBoardsInput

type ListBoardsInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id"         jsonschema:"Project ID or path,required"`
	OrderBy   string               `json:"order_by,omitempty" jsonschema:"Column to order results by for keyset pagination (e.g. id, created_at, updated_at)"`
	Sort      string               `json:"sort,omitempty"     jsonschema:"Sort direction (asc, desc)"`
	toolutil.PaginationInput
	toolutil.KeysetPaginationInput
}

ListBoardsInput represents input for listing project issue boards. OrderBy/Sort/pagination/page_token map onto the embedded gl.ListOptions to mirror the SDK's keyset-capable list options.

type ListBoardsOutput

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

ListBoardsOutput represents a paginated list of boards.

func ListBoards

func ListBoards(ctx context.Context, client *gitlabclient.Client, input ListBoardsInput) (ListBoardsOutput, error)

ListBoards lists all issue boards for a project.

type MilestoneOutput added in v2.3.0

type MilestoneOutput struct {
	ID          int64  `json:"id"`
	IID         int64  `json:"iid"`
	ProjectID   int64  `json:"project_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/boards.md. The board/list `milestone` object surfaces only the fields the documented update-board response lists (id, iid, project_id, title, description, state, timestamps, dates, web_url); gl.Milestone's group_id and expired are not part of the documented board milestone shape.

type ProjectOutput added in v2.3.0

type ProjectOutput struct {
	ID                int64    `json:"id"`
	Name              string   `json:"name,omitempty"`
	NameWithNamespace string   `json:"name_with_namespace,omitempty"`
	Path              string   `json:"path,omitempty"`
	PathWithNamespace string   `json:"path_with_namespace,omitempty"`
	HTTPURLToRepo     string   `json:"http_url_to_repo,omitempty"`
	WebURL            string   `json:"web_url,omitempty"`
	CreatedAt         string   `json:"created_at,omitempty"`
	DefaultBranch     string   `json:"default_branch,omitempty"`
	TagList           []string `json:"tag_list,omitempty"`
	Topics            []string `json:"topics,omitempty"`
	SSHURLToRepo      string   `json:"ssh_url_to_repo,omitempty"`
	ReadmeURL         string   `json:"readme_url,omitempty"`
	AvatarURL         string   `json:"avatar_url,omitempty"`
	StarCount         int64    `json:"star_count,omitempty"`
	ForksCount        int64    `json:"forks_count,omitempty"`
	LastActivityAt    string   `json:"last_activity_at,omitempty"`
}

ProjectOutput is a documented reference subset per doc/api/boards.md. The boards API embeds a project reference on the board's `project` key that contains only the fields the documented response examples list (identity, repo URLs, and the extended fields shown in the update example) — not the full gl.Project payload.

type UpdateBoardInput

type UpdateBoardInput struct {
	ProjectID       toolutil.StringOrInt `json:"project_id" jsonschema:"Project 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 label names"`
	Weight          int64                `json:"weight,omitempty" jsonschema:"Board scope weight"`
	HideBacklogList *bool                `json:"hide_backlog_list,omitempty" jsonschema:"Hide the Open list"`
	HideClosedList  *bool                `json:"hide_closed_list,omitempty" jsonschema:"Hide the Closed list"`
}

UpdateBoardInput represents input for updating a board.

type UpdateBoardListInput

type UpdateBoardListInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project 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"`
}

UpdateBoardListInput represents input for updating (reordering) a board list.

Jump to

Keyboard shortcuts

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