Documentation
¶
Overview ¶
Package epicnotes implements GitLab epic note (comment) operations using the Work Items GraphQL API. Notes are comments attached to group epics and may be system-generated or user-created.
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 ¶
- func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) error
- func FormatListMarkdown(out ListOutput) string
- func FormatOutputMarkdown(n Output) string
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- type CreateInput
- type DeleteInput
- type GetInput
- type ListInput
- type ListOutput
- type Output
- type UpdateInput
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 note from an epic via the destroyNote GraphQL mutation.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) string
FormatListMarkdown renders a list of epic notes as a Markdown table.
func FormatOutputMarkdown ¶
FormatOutputMarkdown renders a single epic note as a Markdown summary.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers MCP tools for GitLab epic note operations.
Types ¶
type CreateInput ¶
type CreateInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"iid" jsonschema:"Epic IID within the group,required"`
Body string `json:"body" jsonschema:"Note body (Markdown supported),required"`
}
CreateInput defines parameters for creating a note on an epic.
type DeleteInput ¶
type DeleteInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"iid" jsonschema:"Epic IID within the group,required"`
NoteID int64 `json:"note_id" jsonschema:"ID of the note to delete,required"`
}
DeleteInput defines parameters for deleting an epic note.
type GetInput ¶
type GetInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"iid" jsonschema:"Epic IID within the group,required"`
NoteID int64 `json:"note_id" jsonschema:"ID of the note to retrieve,required"`
}
GetInput defines parameters for getting a single epic note.
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 epic notes.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Notes []Output `json:"notes"`
Pagination toolutil.GraphQLPaginationOutput `json:"pagination"`
}
ListOutput holds a paginated list of epic notes.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
List retrieves notes on an epic via the Work Items GraphQL API. Notes are extracted from all discussions in the notes widget.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Body string `json:"body"`
Author string `json:"author"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at,omitempty"`
System bool `json:"system"`
}
Output represents a note (comment) on an epic.
func Create ¶
func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (Output, error)
Create adds a new note to an epic via the createNote GraphQL mutation.
func Get ¶
Get retrieves a single note on an epic by querying the notes widget and matching by note ID.
func Update ¶
func Update(ctx context.Context, client *gitlabclient.Client, input UpdateInput) (Output, error)
Update modifies the body of an existing epic note via the updateNote GraphQL mutation.
type UpdateInput ¶
type UpdateInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"iid" jsonschema:"Epic IID within the group,required"`
NoteID int64 `json:"note_id" jsonschema:"ID of the note to update,required"`
Body string `json:"body" jsonschema:"Updated note body (Markdown supported),required"`
}
UpdateInput defines parameters for updating an epic note.