Documentation
¶
Overview ¶
Package cilint implements MCP tools for GitLab CI configuration linting.
The package wraps the GitLab CI lint API:
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 CI lint actions.
func FormatOutputMarkdown ¶
FormatOutputMarkdown renders a CI lint result as Markdown.
Types ¶
type ContentInput ¶
type ContentInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path (namespace context),required"`
Content string `json:"content" jsonschema:"CI/CD YAML content to validate,required"`
DryRun *bool `json:"dry_run" jsonschema:"Run pipeline creation simulation"`
IncludeJobs *bool `json:"include_jobs" jsonschema:"Include expanded job list in the response"`
Ref string `json:"ref" jsonschema:"Branch or tag to use for CI includes resolution"`
}
ContentInput holds parameters for linting arbitrary CI/CD YAML within a project namespace.
type Include ¶
type Include struct {
Type string `json:"type"`
Location string `json:"location"`
ContextProject string `json:"context_project,omitempty"`
}
Include represents an include block found in the CI configuration.
type Output ¶
type Output struct {
toolutil.HintableOutput
Valid bool `json:"valid"`
Errors []string `json:"errors,omitempty"`
Warnings []string `json:"warnings,omitempty"`
MergedYaml string `json:"merged_yaml,omitempty"`
Includes []Include `json:"includes,omitempty"`
}
Output represents the result of a CI lint operation.
func LintContent ¶
func LintContent(ctx context.Context, client *gitlabclient.Client, input ContentInput) (Output, error)
LintContent validates content for the cilint package.
func LintProject ¶
func LintProject(ctx context.Context, client *gitlabclient.Client, input ProjectInput) (Output, error)
LintProject validates project for the cilint package.
type ProjectInput ¶
type ProjectInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
ContentRef string `json:"content_ref" jsonschema:"Branch or tag to use for the CI configuration content"`
DryRun *bool `json:"dry_run" jsonschema:"Run pipeline creation simulation"`
DryRunRef string `json:"dry_run_ref" jsonschema:"Branch or tag to use as context for the dry run"`
IncludeJobs *bool `json:"include_jobs" jsonschema:"Include expanded job list in the response"`
Ref string `json:"ref" jsonschema:"Branch or tag to use for CI includes resolution"`
}
ProjectInput holds parameters for linting a project's CI/CD configuration.
Click to show internal directories.
Click to hide internal directories.