Documentation
¶
Overview ¶
Package deploymentmergerequests implements MCP tools for merge requests associated with GitLab deployments.
The package wraps the GitLab Deployments API merge request endpoints:
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 deployment merge request actions.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) *mcp.CallToolResult
FormatListMarkdown formats the list of deployment merge requests as markdown.
Types ¶
type DiffRefsOutput ¶ added in v2.3.0
type DiffRefsOutput = toolutil.DiffRefsOutput
DiffRefsOutput mirrors gl.MergeRequestDiffRefs (the diff_refs object with the base, head, and start SHAs of a merge request). The canonical definition lives in toolutil.DiffRefsOutput; this alias preserves all existing references within the package unchanged.
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"`
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"`
Approved string `json:"approved,omitempty" jsonschema:"Filter by approval status: yes or no"`
ApprovedByIDs []int64 `json:"approved_by_ids,omitempty" jsonschema:"Filter by MRs approved by all listed user IDs"`
ApproverIDs []int64 `json:"approver_ids,omitempty" jsonschema:"Filter by MRs with all listed users as eligible approvers"`
AssigneeID int64 `json:"assignee_id,omitempty" jsonschema:"Filter by assignee user ID"`
AuthorID int64 `json:"author_id,omitempty" jsonschema:"Filter by author user ID"`
AuthorUsername string `json:"author_username,omitempty" jsonschema:"Filter by author username"`
NotAuthorUsername string `json:"not_author_username,omitempty" jsonschema:"Exclude MRs authored by this username"`
ReviewerID int64 `json:"reviewer_id,omitempty" jsonschema:"Filter by reviewer user ID"`
ReviewerUsername string `json:"reviewer_username,omitempty" jsonschema:"Filter by reviewer username"`
Labels []string `json:"labels,omitempty" jsonschema:"Label names to filter by"`
NotLabels []string `json:"not_labels,omitempty" jsonschema:"Label names to exclude"`
Milestone string `json:"milestone,omitempty" jsonschema:"Milestone title to filter by"`
Scope string `json:"scope,omitempty" jsonschema:"Filter by scope (created_by_me, assigned_to_me, all)"`
Search string `json:"search,omitempty" jsonschema:"Search in title and description"`
SourceBranch string `json:"source_branch,omitempty" jsonschema:"Filter by source branch name"`
TargetBranch string `json:"target_branch,omitempty" jsonschema:"Filter by target branch name"`
MyReactionEmoji string `json:"my_reaction_emoji,omitempty" jsonschema:"Filter by MRs the caller reacted to with this emoji (e.g. thumbsup)"`
View string `json:"view,omitempty" jsonschema:"Set to 'simple' to return only basic MR fields"`
WIP string `json:"wip,omitempty" jsonschema:"Filter by draft/WIP status: 'yes' for draft MRs, 'no' for non-draft"`
WithLabelsDetails *bool `json:"with_labels_details,omitempty" jsonschema:"Include full label details (color, description) in the response"`
WithMergeStatusRecheck *bool `json:"with_merge_status_recheck,omitempty" jsonschema:"Asynchronously recalculate each MR's merge_status before returning"`
CreatedAfter string `json:"created_after,omitempty" jsonschema:"Return MRs created after date (ISO 8601, e.g. 2025-01-01T00:00:00Z)"`
CreatedBefore string `json:"created_before,omitempty" jsonschema:"Return MRs created before date (ISO 8601, e.g. 2025-12-31T23:59:59Z)"`
UpdatedAfter string `json:"updated_after,omitempty" jsonschema:"Return MRs updated after date (ISO 8601, e.g. 2025-01-01T00:00:00Z)"`
UpdatedBefore string `json:"updated_before,omitempty" jsonschema:"Return MRs updated before date (ISO 8601, e.g. 2025-12-31T23:59:59Z)"`
Draft *bool `json:"draft,omitempty" jsonschema:"Filter by draft status (true=only drafts, false=only non-drafts)"`
In string `` /* 129-byte string literal not displayed */
toolutil.PaginationInput
toolutil.KeysetPaginationInput
}
ListInput is the input for listing deployment merge requests. The deployment merge requests endpoint shares its query options with the project merge request list endpoint (gl.ListMergeRequestsOptions), so this mirrors the same filters for 1:1 fidelity with client-go.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
MergeRequests []Output `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 Output ¶ added in v2.3.0
type Output = toolutil.MergeRequestOutput
Output is the canonical merge-request output shape shared with the mergerequests domain. The single authoritative definition lives in toolutil.MergeRequestOutput; this alias keeps all existing call sites within this package unchanged (ADR-0004).
type TimeStatsOutput ¶ added in v2.3.0
type TimeStatsOutput = toolutil.TimeStatsOutput
TimeStatsOutput is the canonical pure time-tracking sub-object from toolutil. Aliased here so call sites within this package remain unchanged.