notifications

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

markdown.go provides Markdown formatting functions for notification settings MCP tool output.

Package notifications implements MCP tools for GitLab notification settings.

register.go wires notifications MCP tools to the MCP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMarkdown

func FormatMarkdown(out Output) *mcp.CallToolResult

FormatMarkdown formats notification settings as a Markdown CallToolResult.

func FormatMarkdownString

func FormatMarkdownString(out Output) string

FormatMarkdownString renders notification settings as Markdown.

func RegisterMeta

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

RegisterMeta registers the gitlab_notification meta-tool.

func RegisterTools

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

RegisterTools registers individual notification settings tools.

Types

type EventOutput

type EventOutput struct {
	CloseIssue                bool `json:"close_issue"`
	CloseMergeRequest         bool `json:"close_merge_request"`
	FailedPipeline            bool `json:"failed_pipeline"`
	FixedPipeline             bool `json:"fixed_pipeline"`
	IssueDue                  bool `json:"issue_due"`
	MergeWhenPipelineSucceeds bool `json:"merge_when_pipeline_succeeds"`
	MergeMergeRequest         bool `json:"merge_merge_request"`
	MovedProject              bool `json:"moved_project"`
	NewIssue                  bool `json:"new_issue"`
	NewMergeRequest           bool `json:"new_merge_request"`
	NewEpic                   bool `json:"new_epic"`
	NewNote                   bool `json:"new_note"`
	PushToMergeRequest        bool `json:"push_to_merge_request"`
	ReassignIssue             bool `json:"reassign_issue"`
	ReassignMergeRequest      bool `json:"reassign_merge_request"`
	ReopenIssue               bool `json:"reopen_issue"`
	ReopenMergeRequest        bool `json:"reopen_merge_request"`
	SuccessPipeline           bool `json:"success_pipeline"`
}

EventOutput represents which events trigger notifications.

type GetGlobalInput

type GetGlobalInput struct{}

GetGlobalInput is the input for getting global notification settings.

type GetGroupInput

type GetGroupInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
}

GetGroupInput is the input for getting group notification settings.

type GetProjectInput

type GetProjectInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}

GetProjectInput is the input for getting project notification settings.

type Output

type Output struct {
	toolutil.HintableOutput
	Level             string       `json:"level"`
	NotificationEmail string       `json:"notification_email,omitempty"`
	Events            *EventOutput `json:"events,omitempty"`
}

Output represents notification settings.

func GetGlobalSettings

func GetGlobalSettings(ctx context.Context, client *gitlabclient.Client, _ GetGlobalInput) (Output, error)

GetGlobalSettings gets global notification settings.

func GetSettingsForGroup

func GetSettingsForGroup(ctx context.Context, client *gitlabclient.Client, input GetGroupInput) (Output, error)

GetSettingsForGroup gets notification settings for a group.

func GetSettingsForProject

func GetSettingsForProject(ctx context.Context, client *gitlabclient.Client, input GetProjectInput) (Output, error)

GetSettingsForProject gets notification settings for a project.

func UpdateGlobalSettings

func UpdateGlobalSettings(ctx context.Context, client *gitlabclient.Client, input UpdateGlobalInput) (Output, error)

UpdateGlobalSettings updates global notification settings.

func UpdateSettingsForGroup

func UpdateSettingsForGroup(ctx context.Context, client *gitlabclient.Client, input UpdateGroupInput) (Output, error)

UpdateSettingsForGroup updates notification settings for a group.

func UpdateSettingsForProject

func UpdateSettingsForProject(ctx context.Context, client *gitlabclient.Client, input UpdateProjectInput) (Output, error)

UpdateSettingsForProject updates notification settings for a project.

type UpdateGlobalInput

type UpdateGlobalInput struct {
	// contains filtered or unexported fields
}

UpdateGlobalInput is the input for updating global notification settings.

type UpdateGroupInput

type UpdateGroupInput struct {
	GroupID toolutil.StringOrInt `json:"group_id" jsonschema:"Group ID or URL-encoded path,required"`
	// contains filtered or unexported fields
}

UpdateGroupInput is the input for updating group notification settings.

type UpdateProjectInput

type UpdateProjectInput struct {
	ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
	// contains filtered or unexported fields
}

UpdateProjectInput is the input for updating project notification settings.

Jump to

Keyboard shortcuts

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