Documentation
¶
Overview ¶
Package epicdiscussions implements MCP tools for GitLab epic discussion operations.
The package wraps the GitLab Discussions API for epic threads:
Index ¶
- func ActionSpecs(client *gitlabclient.Client) []toolutil.ActionSpec
- func DeleteNote(ctx context.Context, client *gitlabclient.Client, input DeleteNoteInput) error
- func DeleteNoteOutput(ctx context.Context, client *gitlabclient.Client, input DeleteNoteInput) (toolutil.DeleteOutput, error)
- func FormatListMarkdownString(out ListOutput) string
- func FormatMarkdownString(out Output) string
- func FormatNoteMarkdownString(out NoteOutput) string
- type AddNoteInput
- type CreateInput
- type DeleteNoteInput
- type GetInput
- type ListInput
- type ListOutput
- type NoteOutput
- type Output
- type UpdateNoteInput
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 epic discussion actions.
func DeleteNote ¶
func DeleteNote(ctx context.Context, client *gitlabclient.Client, input DeleteNoteInput) error
DeleteNote deletes an epic discussion note via the destroyNote GraphQL mutation.
func DeleteNoteOutput ¶
func DeleteNoteOutput(ctx context.Context, client *gitlabclient.Client, input DeleteNoteInput) (toolutil.DeleteOutput, error)
DeleteNoteOutput deletes an epic discussion note and returns the canonical success message shape.
func FormatListMarkdownString ¶
func FormatListMarkdownString(out ListOutput) string
FormatListMarkdownString renders discussions list as Markdown.
func FormatMarkdownString ¶
FormatMarkdownString renders a discussion as Markdown.
func FormatNoteMarkdownString ¶
func FormatNoteMarkdownString(out NoteOutput) string
FormatNoteMarkdownString renders a note as Markdown.
Types ¶
type AddNoteInput ¶
type AddNoteInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"epic_iid" jsonschema:"Epic IID within the group,required"`
DiscussionID string `json:"discussion_id" jsonschema:"Discussion ID to reply to,required"`
Body string `json:"body" jsonschema:"Note body (Markdown supported),required"`
}
AddNoteInput defines parameters for adding a note to an epic discussion.
type CreateInput ¶
type CreateInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"epic_iid" jsonschema:"Epic IID within the group,required"`
Body string `json:"body" jsonschema:"Discussion body (Markdown supported),required"`
}
CreateInput defines parameters for creating an epic discussion.
type DeleteNoteInput ¶
type DeleteNoteInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"epic_iid" jsonschema:"Epic IID within the group,required"`
NoteID int64 `json:"note_id" jsonschema:"Note ID to delete,required"`
}
DeleteNoteInput defines parameters for deleting an epic discussion 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:"epic_iid" jsonschema:"Epic IID within the group,required"`
DiscussionID string `json:"discussion_id" jsonschema:"Discussion ID,required"`
}
GetInput defines parameters for getting a single epic discussion.
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:"epic_iid" jsonschema:"Epic IID within the group,required"`
toolutil.GraphQLPaginationInput
}
ListInput defines parameters for listing epic discussions.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Discussions []Output `json:"discussions"`
Pagination toolutil.GraphQLPaginationOutput `json:"pagination"`
}
ListOutput holds a list of epic discussions.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
List retrieves discussion threads on an epic via the Work Items GraphQL API.
type NoteOutput ¶
type NoteOutput 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"`
}
NoteOutput represents a single note within a discussion.
func AddNote ¶
func AddNote(ctx context.Context, client *gitlabclient.Client, input AddNoteInput) (NoteOutput, error)
AddNote adds a reply note to an existing discussion thread via the createNote GraphQL mutation with a discussionId.
func UpdateNote ¶
func UpdateNote(ctx context.Context, client *gitlabclient.Client, input UpdateNoteInput) (NoteOutput, error)
UpdateNote updates an existing epic discussion note via the updateNote GraphQL mutation.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID string `json:"id"`
Notes []NoteOutput `json:"notes"`
}
Output represents a discussion thread.
func Create ¶
func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (Output, error)
Create starts a new discussion thread on an epic via the createNote GraphQL mutation.
type UpdateNoteInput ¶
type UpdateNoteInput struct {
FullPath string `json:"full_path" jsonschema:"Full path of the group (e.g. my-group),required"`
IID int64 `json:"epic_iid" jsonschema:"Epic IID within the group,required"`
NoteID int64 `json:"note_id" jsonschema:"Note ID to update,required"`
Body string `json:"body" jsonschema:"Updated note body,required"`
}
UpdateNoteInput defines parameters for updating an epic discussion note.