Documentation
¶
Overview ¶
Package externalstatuschecks implements MCP tool handlers for GitLab external status check operations. It wraps the ExternalStatusChecks service from client-go v2, covering both deprecated and current endpoints.
Index ¶
- func CreateExternalStatusCheck(ctx context.Context, client *gitlabclient.Client, input CreateLegacyInput) error
- func DeleteExternalStatusCheck(ctx context.Context, client *gitlabclient.Client, input DeleteLegacyInput) error
- func DeleteProjectExternalStatusCheck(ctx context.Context, client *gitlabclient.Client, input DeleteProjectInput) error
- func FormatListMergeMarkdown(out ListMergeStatusCheckOutput) string
- func FormatListProjectMarkdown(out ListProjectStatusCheckOutput) string
- func FormatMergeCheckMarkdown(out MergeStatusCheckOutput) string
- func FormatProjectCheckMarkdown(out ProjectStatusCheckOutput) string
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- func RetryFailedExternalStatusCheckForProjectMR(ctx context.Context, client *gitlabclient.Client, input RetryProjectInput) error
- func RetryFailedStatusCheckForMR(ctx context.Context, client *gitlabclient.Client, input RetryLegacyInput) error
- func SetExternalStatusCheckStatus(ctx context.Context, client *gitlabclient.Client, input SetStatusInput) error
- func SetProjectMRExternalStatusCheckStatus(ctx context.Context, client *gitlabclient.Client, input SetProjectStatusInput) error
- func UpdateExternalStatusCheck(ctx context.Context, client *gitlabclient.Client, input UpdateLegacyInput) error
- type CreateLegacyInput
- type CreateProjectInput
- type DeleteLegacyInput
- type DeleteProjectInput
- type ListMergeStatusCheckOutput
- type ListMergeStatusChecksInput
- type ListProjectInput
- type ListProjectMRInput
- type ListProjectStatusCheckOutput
- type ListProjectStatusChecksInput
- type MergeStatusCheckOutput
- type ProjectStatusCheckOutput
- type ProtectedBranchOutput
- type RetryLegacyInput
- type RetryProjectInput
- type SetProjectStatusInput
- type SetStatusInput
- type UpdateLegacyInput
- type UpdateProjectInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateExternalStatusCheck ¶
func CreateExternalStatusCheck(ctx context.Context, client *gitlabclient.Client, input CreateLegacyInput) error
CreateExternalStatusCheck creates a project external status check (deprecated).
func DeleteExternalStatusCheck ¶
func DeleteExternalStatusCheck(ctx context.Context, client *gitlabclient.Client, input DeleteLegacyInput) error
DeleteExternalStatusCheck deletes a project external status check (deprecated).
func DeleteProjectExternalStatusCheck ¶
func DeleteProjectExternalStatusCheck(ctx context.Context, client *gitlabclient.Client, input DeleteProjectInput) error
DeleteProjectExternalStatusCheck deletes an external status check from a project.
func FormatListMergeMarkdown ¶
func FormatListMergeMarkdown(out ListMergeStatusCheckOutput) string
FormatListMergeMarkdown renders a list of merge status checks as a Markdown table.
func FormatListProjectMarkdown ¶
func FormatListProjectMarkdown(out ListProjectStatusCheckOutput) string
FormatListProjectMarkdown renders a list of project status checks as a Markdown table.
func FormatMergeCheckMarkdown ¶
func FormatMergeCheckMarkdown(out MergeStatusCheckOutput) string
FormatMergeCheckMarkdown renders a single merge status check as Markdown.
func FormatProjectCheckMarkdown ¶
func FormatProjectCheckMarkdown(out ProjectStatusCheckOutput) string
FormatProjectCheckMarkdown renders a single project status check as Markdown.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers all external status check tools on the given MCP server.
func RetryFailedExternalStatusCheckForProjectMR ¶
func RetryFailedExternalStatusCheckForProjectMR(ctx context.Context, client *gitlabclient.Client, input RetryProjectInput) error
RetryFailedExternalStatusCheckForProjectMR retries a failed external status check for a project merge request.
func RetryFailedStatusCheckForMR ¶
func RetryFailedStatusCheckForMR(ctx context.Context, client *gitlabclient.Client, input RetryLegacyInput) error
RetryFailedStatusCheckForMR retries a failed external status check for a merge request (deprecated).
func SetExternalStatusCheckStatus ¶
func SetExternalStatusCheckStatus(ctx context.Context, client *gitlabclient.Client, input SetStatusInput) error
SetExternalStatusCheckStatus sets the status of an external status check (deprecated).
func SetProjectMRExternalStatusCheckStatus ¶
func SetProjectMRExternalStatusCheckStatus(ctx context.Context, client *gitlabclient.Client, input SetProjectStatusInput) error
SetProjectMRExternalStatusCheckStatus sets the status of an external status check for a project merge request.
func UpdateExternalStatusCheck ¶
func UpdateExternalStatusCheck(ctx context.Context, client *gitlabclient.Client, input UpdateLegacyInput) error
UpdateExternalStatusCheck updates a project external status check (deprecated).
Types ¶
type CreateLegacyInput ¶
type CreateLegacyInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Name string `json:"name" jsonschema:"Name of the external status check,required"`
ExternalURL string `json:"external_url" jsonschema:"External URL for the status check,required"`
ProtectedBranchIDs []int64 `json:"protected_branch_ids,omitempty" jsonschema:"IDs of protected branches to scope the check to"`
}
type CreateProjectInput ¶
type CreateProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Name string `json:"name" jsonschema:"Name of the external status check,required"`
ExternalURL string `json:"external_url" jsonschema:"External URL for the status check,required"`
ProtectedBranchIDs []int64 `json:"protected_branch_ids,omitempty" jsonschema:"IDs of protected branches to scope the check to"`
}
type DeleteLegacyInput ¶
type DeleteLegacyInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
CheckID int64 `json:"check_id" jsonschema:"External status check ID to delete,required"`
}
type DeleteProjectInput ¶
type DeleteProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
CheckID int64 `json:"check_id" jsonschema:"External status check ID to delete,required"`
}
type ListMergeStatusCheckOutput ¶
type ListMergeStatusCheckOutput struct {
toolutil.HintableOutput
Items []MergeStatusCheckOutput `json:"items"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
func ListMergeStatusChecks ¶
func ListMergeStatusChecks(ctx context.Context, client *gitlabclient.Client, input ListMergeStatusChecksInput) (ListMergeStatusCheckOutput, error)
ListMergeStatusChecks lists merge status checks for a merge request (deprecated).
func ListProjectMRExternalStatusChecks ¶
func ListProjectMRExternalStatusChecks(ctx context.Context, client *gitlabclient.Client, input ListProjectMRInput) (ListMergeStatusCheckOutput, error)
ListProjectMRExternalStatusChecks lists external status checks for a project merge request.
type ListMergeStatusChecksInput ¶
type ListMergeStatusChecksInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
MRIID int64 `json:"mr_iid" jsonschema:"Merge request internal ID,required"`
toolutil.PaginationInput
}
type ListProjectInput ¶
type ListProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
toolutil.PaginationInput
}
type ListProjectMRInput ¶
type ListProjectMRInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
MRIID int64 `json:"mr_iid" jsonschema:"Merge request internal ID,required"`
toolutil.PaginationInput
}
type ListProjectStatusCheckOutput ¶
type ListProjectStatusCheckOutput struct {
toolutil.HintableOutput
Items []ProjectStatusCheckOutput `json:"items"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
func ListProjectExternalStatusChecks ¶
func ListProjectExternalStatusChecks(ctx context.Context, client *gitlabclient.Client, input ListProjectInput) (ListProjectStatusCheckOutput, error)
ListProjectExternalStatusChecks lists external status checks for a project.
func ListProjectStatusChecks ¶
func ListProjectStatusChecks(ctx context.Context, client *gitlabclient.Client, input ListProjectStatusChecksInput) (ListProjectStatusCheckOutput, error)
ListProjectStatusChecks lists project-level status checks (deprecated interface, not function).
type ListProjectStatusChecksInput ¶
type ListProjectStatusChecksInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
toolutil.PaginationInput
}
type MergeStatusCheckOutput ¶
type ProjectStatusCheckOutput ¶
type ProjectStatusCheckOutput struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Name string `json:"name"`
ProjectID int64 `json:"project_id"`
ExternalURL string `json:"external_url"`
HMAC bool `json:"hmac"`
ProtectedBranches []ProtectedBranchOutput `json:"protected_branches,omitempty"`
}
func CreateProjectExternalStatusCheck ¶
func CreateProjectExternalStatusCheck(ctx context.Context, client *gitlabclient.Client, input CreateProjectInput) (ProjectStatusCheckOutput, error)
CreateProjectExternalStatusCheck creates an external status check for a project.
func UpdateProjectExternalStatusCheck ¶
func UpdateProjectExternalStatusCheck(ctx context.Context, client *gitlabclient.Client, input UpdateProjectInput) (ProjectStatusCheckOutput, error)
UpdateProjectExternalStatusCheck updates an external status check for a project.
type ProtectedBranchOutput ¶
type RetryLegacyInput ¶
type RetryLegacyInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
MRIID int64 `json:"mr_iid" jsonschema:"Merge request internal ID,required"`
CheckID int64 `json:"check_id" jsonschema:"External status check ID to retry,required"`
}
type RetryProjectInput ¶
type RetryProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
MRIID int64 `json:"mr_iid" jsonschema:"Merge request internal ID,required"`
CheckID int64 `json:"check_id" jsonschema:"External status check ID to retry,required"`
}
type SetProjectStatusInput ¶
type SetProjectStatusInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
MRIID int64 `json:"mr_iid" jsonschema:"Merge request internal ID,required"`
SHA string `json:"sha" jsonschema:"Head SHA of the merge request source branch,required"`
ExternalStatusCheckID int64 `json:"external_status_check_id" jsonschema:"External status check ID to update,required"`
Status string `json:"status" jsonschema:"Status value (e.g. passed, failed),required"`
}
type SetStatusInput ¶
type SetStatusInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
MRIID int64 `json:"mr_iid" jsonschema:"Merge request internal ID,required"`
SHA string `json:"sha" jsonschema:"Head SHA of the merge request source branch,required"`
ExternalStatusCheckID int64 `json:"external_status_check_id" jsonschema:"External status check ID to update,required"`
Status string `json:"status" jsonschema:"Status value (e.g. passed, failed),required"`
}
type UpdateLegacyInput ¶
type UpdateLegacyInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
CheckID int64 `json:"check_id" jsonschema:"External status check ID to update,required"`
Name string `json:"name,omitempty" jsonschema:"Updated name"`
ExternalURL string `json:"external_url,omitempty" jsonschema:"Updated external URL"`
ProtectedBranchIDs []int64 `json:"protected_branch_ids,omitempty" jsonschema:"Updated protected branch IDs"`
}
type UpdateProjectInput ¶
type UpdateProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
CheckID int64 `json:"check_id" jsonschema:"External status check ID to update,required"`
Name string `json:"name,omitempty" jsonschema:"Updated name"`
ExternalURL string `json:"external_url,omitempty" jsonschema:"Updated external URL"`
ProtectedBranchIDs []int64 `json:"protected_branch_ids,omitempty" jsonschema:"Updated protected branch IDs"`
}