Documentation
¶
Overview ¶
Package deploymentmergerequests implements an MCP tool handler for listing merge requests associated with a GitLab deployment. It wraps the DeploymentMergeRequestsService from client-go v2.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) *mcp.CallToolResult
FormatListMarkdown formats the list of deployment merge requests as markdown.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers the deployment merge requests tool on the MCP server.
Types ¶
type ListInput ¶
type ListInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
DeploymentID int64 `json:"deployment_id" jsonschema:"Deployment ID,required"`
Page int64 `json:"page,omitempty" jsonschema:"Page number for pagination"`
PerPage int64 `json:"per_page,omitempty" jsonschema:"Number of items per page (max 100)"`
State string `json:"state,omitempty" jsonschema:"Filter by state: opened, closed, merged, all"`
OrderBy string `json:"order_by,omitempty" jsonschema:"Order by: created_at or updated_at"`
Sort string `json:"sort,omitempty" jsonschema:"Sort order: asc or desc"`
}
ListInput is the input for listing deployment merge requests.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
MergeRequests []MergeRequestItem `json:"merge_requests"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListOutput is the output for listing deployment merge requests.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
List returns merge requests associated with a deployment.
type MergeRequestItem ¶
type MergeRequestItem struct {
IID int64 `json:"mr_iid"`
Title string `json:"title"`
State string `json:"state"`
Author string `json:"author"`
SourceBranch string `json:"source_branch"`
TargetBranch string `json:"target_branch"`
WebURL string `json:"web_url"`
MergedAt string `json:"merged_at,omitempty"`
}
MergeRequestItem is a summary of a merge request associated with a deployment.
Click to show internal directories.
Click to hide internal directories.