Documentation
¶
Overview ¶
Package projects implements GitLab project operations including create, get, list, delete, update, restore, fork, star, unstar, archive, unarchive, transfer, list forks, get languages, webhook management (list, get, add, edit, delete, trigger test), user/group/starrer listings, share/unshare with groups, invited groups, push rules (get, add, edit, delete), and user contributed/starred project listings. It exposes typed input/output structs and handler functions registered as MCP tools.
Index ¶
- func DeleteApprovalRule(ctx context.Context, client *gitlabclient.Client, ...) error
- func DeleteCustomHeader(ctx context.Context, client *gitlabclient.Client, ...) error
- func DeleteForkRelation(ctx context.Context, client *gitlabclient.Client, ...) error
- func DeleteHook(ctx context.Context, client *gitlabclient.Client, input DeleteHookInput) error
- func DeletePushRule(ctx context.Context, client *gitlabclient.Client, input DeletePushRuleInput) error
- func DeleteSharedProjectFromGroup(ctx context.Context, client *gitlabclient.Client, input DeleteSharedGroupInput) error
- func DeleteWebhookURLVariable(ctx context.Context, client *gitlabclient.Client, ...) error
- func FormatApprovalConfigMarkdown(out ApprovalConfigOutput) string
- func FormatApprovalRuleMarkdown(out ApprovalRuleOutput) string
- func FormatDeleteMarkdown(out DeleteOutput) string
- func FormatDownloadAvatarMarkdown(out DownloadAvatarOutput) string
- func FormatForkRelationMarkdown(out ForkRelationOutput) string
- func FormatHookMarkdown(out HookOutput) string
- func FormatLanguagesMarkdown(out LanguagesOutput) string
- func FormatListApprovalRulesMarkdown(out ListApprovalRulesOutput) string
- func FormatListForksMarkdown(out ListForksOutput) string
- func FormatListHooksMarkdown(out ListHooksOutput) string
- func FormatListMarkdown(out ListOutput) string
- func FormatListProjectGroupsMarkdown(out ListProjectGroupsOutput) string
- func FormatListProjectUsersMarkdown(out ListProjectUsersOutput) string
- func FormatListStarrersMarkdown(out ListProjectStarrersOutput) string
- func FormatMarkdown(p Output) string
- func FormatPullMirrorMarkdown(out PullMirrorOutput) string
- func FormatPushRuleMarkdown(out PushRuleOutput) string
- func FormatRepositoryStorageMarkdown(out RepositoryStorageOutput) string
- func FormatShareProjectMarkdown(out ShareProjectOutput) string
- func RegisterPushRuleTools(server *mcp.Server, client *gitlabclient.Client)
- func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
- func SetCustomHeader(ctx context.Context, client *gitlabclient.Client, input SetCustomHeaderInput) error
- func SetWebhookURLVariable(ctx context.Context, client *gitlabclient.Client, ...) error
- func StartHousekeeping(ctx context.Context, client *gitlabclient.Client, input StartHousekeepingInput) error
- func StartMirroring(ctx context.Context, client *gitlabclient.Client, input StartMirroringInput) error
- type AddHookInput
- type AddPushRuleInput
- type ApprovalConfigOutput
- type ApprovalRuleOutput
- func CreateApprovalRule(ctx context.Context, client *gitlabclient.Client, ...) (ApprovalRuleOutput, error)
- func GetApprovalRule(ctx context.Context, client *gitlabclient.Client, input GetApprovalRuleInput) (ApprovalRuleOutput, error)
- func UpdateApprovalRule(ctx context.Context, client *gitlabclient.Client, ...) (ApprovalRuleOutput, error)
- type ArchiveInput
- type ChangeApprovalConfigInput
- type ConfigurePullMirrorInput
- type CreateApprovalRuleInput
- type CreateForUserInput
- type CreateForkRelationInput
- type CreateInput
- type DeleteApprovalRuleInput
- type DeleteCustomHeaderInput
- type DeleteForkRelationInput
- type DeleteHookInput
- type DeleteInput
- type DeleteOutput
- type DeletePushRuleInput
- type DeleteSharedGroupInput
- type DeleteWebhookURLVariableInput
- type DownloadAvatarInput
- type DownloadAvatarOutput
- type EditHookInput
- type EditPushRuleInput
- type ForkInput
- type ForkRelationOutput
- type GetApprovalConfigInput
- type GetApprovalRuleInput
- type GetHookInput
- type GetInput
- type GetLanguagesInput
- type GetPullMirrorInput
- type GetPushRulesInput
- type GetRepositoryStorageInput
- type HookOutput
- func AddHook(ctx context.Context, client *gitlabclient.Client, input AddHookInput) (HookOutput, error)
- func EditHook(ctx context.Context, client *gitlabclient.Client, input EditHookInput) (HookOutput, error)
- func GetHook(ctx context.Context, client *gitlabclient.Client, input GetHookInput) (HookOutput, error)
- type LanguageEntry
- type LanguagesOutput
- type ListApprovalRulesInput
- type ListApprovalRulesOutput
- type ListForksInput
- type ListForksOutput
- type ListHooksInput
- type ListHooksOutput
- type ListInput
- type ListInvitedGroupsInput
- type ListOutput
- func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
- func ListUserContributedProjects(ctx context.Context, client *gitlabclient.Client, ...) (ListOutput, error)
- func ListUserProjects(ctx context.Context, client *gitlabclient.Client, input ListUserProjectsInput) (ListOutput, error)
- func ListUserStarredProjects(ctx context.Context, client *gitlabclient.Client, ...) (ListOutput, error)
- type ListProjectGroupsInput
- type ListProjectGroupsOutput
- type ListProjectStarrersInput
- type ListProjectStarrersOutput
- type ListProjectUsersInput
- type ListProjectUsersOutput
- type ListUserContributedProjectsInput
- type ListUserProjectsInput
- type ListUserStarredProjectsInput
- type Output
- func Archive(ctx context.Context, client *gitlabclient.Client, input ArchiveInput) (Output, error)
- func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (Output, error)
- func CreateForUser(ctx context.Context, client *gitlabclient.Client, input CreateForUserInput) (Output, error)
- func Fork(ctx context.Context, client *gitlabclient.Client, input ForkInput) (Output, error)
- func Get(ctx context.Context, client *gitlabclient.Client, input GetInput) (Output, error)
- func Restore(ctx context.Context, client *gitlabclient.Client, input RestoreInput) (Output, error)
- func Star(ctx context.Context, client *gitlabclient.Client, input StarInput) (Output, error)
- func ToOutput(p *gl.Project) Output
- func Transfer(ctx context.Context, client *gitlabclient.Client, input TransferInput) (Output, error)
- func Unarchive(ctx context.Context, client *gitlabclient.Client, input UnarchiveInput) (Output, error)
- func Unstar(ctx context.Context, client *gitlabclient.Client, input UnstarInput) (Output, error)
- func Update(ctx context.Context, client *gitlabclient.Client, input UpdateInput) (Output, error)
- func UploadAvatar(ctx context.Context, client *gitlabclient.Client, input UploadAvatarInput) (Output, error)
- type ProjectGroupOutput
- type ProjectUserOutput
- type PullMirrorOutput
- type PushRuleOutput
- func AddPushRule(ctx context.Context, client *gitlabclient.Client, input AddPushRuleInput) (PushRuleOutput, error)
- func EditPushRule(ctx context.Context, client *gitlabclient.Client, input EditPushRuleInput) (PushRuleOutput, error)
- func GetPushRules(ctx context.Context, client *gitlabclient.Client, input GetPushRulesInput) (PushRuleOutput, error)
- type RepositoryStorageOutput
- type RestoreInput
- type SetCustomHeaderInput
- type SetWebhookURLVariableInput
- type ShareProjectInput
- type ShareProjectOutput
- type StarInput
- type StarrerOutput
- type StartHousekeepingInput
- type StartMirroringInput
- type TransferInput
- type TriggerTestHookInput
- type TriggerTestHookOutput
- type UnarchiveInput
- type UnstarInput
- type UpdateApprovalRuleInput
- type UpdateInput
- type UploadAvatarInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteApprovalRule ¶
func DeleteApprovalRule(ctx context.Context, client *gitlabclient.Client, input DeleteApprovalRuleInput) error
DeleteApprovalRule deletes a project-level approval rule.
func DeleteCustomHeader ¶
func DeleteCustomHeader(ctx context.Context, client *gitlabclient.Client, input DeleteCustomHeaderInput) error
DeleteCustomHeader deletes a custom header from a project webhook.
func DeleteForkRelation ¶
func DeleteForkRelation(ctx context.Context, client *gitlabclient.Client, input DeleteForkRelationInput) error
DeleteForkRelation removes the fork relationship from a project.
func DeleteHook ¶
func DeleteHook(ctx context.Context, client *gitlabclient.Client, input DeleteHookInput) error
DeleteHook deletes a project webhook.
func DeletePushRule ¶
func DeletePushRule(ctx context.Context, client *gitlabclient.Client, input DeletePushRuleInput) error
DeletePushRule deletes the push rule configuration from a project.
func DeleteSharedProjectFromGroup ¶
func DeleteSharedProjectFromGroup(ctx context.Context, client *gitlabclient.Client, input DeleteSharedGroupInput) error
DeleteSharedProjectFromGroup removes a shared group link from a project.
func DeleteWebhookURLVariable ¶
func DeleteWebhookURLVariable(ctx context.Context, client *gitlabclient.Client, input DeleteWebhookURLVariableInput) error
DeleteWebhookURLVariable deletes a URL variable from a project webhook.
func FormatApprovalConfigMarkdown ¶
func FormatApprovalConfigMarkdown(out ApprovalConfigOutput) string
FormatApprovalConfigMarkdown renders approval configuration as Markdown.
func FormatApprovalRuleMarkdown ¶
func FormatApprovalRuleMarkdown(out ApprovalRuleOutput) string
FormatApprovalRuleMarkdown renders a single approval rule as Markdown.
func FormatDeleteMarkdown ¶
func FormatDeleteMarkdown(out DeleteOutput) string
FormatDeleteMarkdown renders a project deletion result as a Markdown summary.
func FormatDownloadAvatarMarkdown ¶
func FormatDownloadAvatarMarkdown(out DownloadAvatarOutput) string
FormatDownloadAvatarMarkdown renders an avatar download result as Markdown.
func FormatForkRelationMarkdown ¶
func FormatForkRelationMarkdown(out ForkRelationOutput) string
FormatForkRelationMarkdown renders a fork relation as Markdown.
func FormatHookMarkdown ¶
func FormatHookMarkdown(out HookOutput) string
FormatHookMarkdown renders a single project webhook as Markdown.
func FormatLanguagesMarkdown ¶
func FormatLanguagesMarkdown(out LanguagesOutput) string
FormatLanguagesMarkdown renders project languages as Markdown.
func FormatListApprovalRulesMarkdown ¶
func FormatListApprovalRulesMarkdown(out ListApprovalRulesOutput) string
FormatListApprovalRulesMarkdown renders a list of approval rules as Markdown.
func FormatListForksMarkdown ¶
func FormatListForksMarkdown(out ListForksOutput) string
FormatListForksMarkdown renders a list of project forks as Markdown.
func FormatListHooksMarkdown ¶
func FormatListHooksMarkdown(out ListHooksOutput) string
FormatListHooksMarkdown renders a list of project webhooks as Markdown.
func FormatListMarkdown ¶
func FormatListMarkdown(out ListOutput) string
FormatListMarkdown renders a list of projects as a Markdown table.
func FormatListProjectGroupsMarkdown ¶
func FormatListProjectGroupsMarkdown(out ListProjectGroupsOutput) string
FormatListProjectGroupsMarkdown renders a project groups list as markdown.
func FormatListProjectUsersMarkdown ¶
func FormatListProjectUsersMarkdown(out ListProjectUsersOutput) string
FormatListProjectUsersMarkdown renders a users list as markdown.
func FormatListStarrersMarkdown ¶
func FormatListStarrersMarkdown(out ListProjectStarrersOutput) string
FormatListStarrersMarkdown renders a starrers list as markdown.
func FormatMarkdown ¶
FormatMarkdown renders a single project as a Markdown summary.
func FormatPullMirrorMarkdown ¶
func FormatPullMirrorMarkdown(out PullMirrorOutput) string
FormatPullMirrorMarkdown renders pull mirror details as Markdown.
func FormatPushRuleMarkdown ¶
func FormatPushRuleMarkdown(out PushRuleOutput) string
FormatPushRuleMarkdown renders a push rule as markdown.
func FormatRepositoryStorageMarkdown ¶
func FormatRepositoryStorageMarkdown(out RepositoryStorageOutput) string
FormatRepositoryStorageMarkdown renders repository storage info as Markdown.
func FormatShareProjectMarkdown ¶
func FormatShareProjectMarkdown(out ShareProjectOutput) string
FormatShareProjectMarkdown renders a share-project result as markdown.
func RegisterPushRuleTools ¶
func RegisterPushRuleTools(server *mcp.Server, client *gitlabclient.Client)
RegisterPushRuleTools registers push rule tools (Premium/Ultimate only). Called separately from RegisterAll when enterprise mode is enabled.
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client *gitlabclient.Client)
RegisterTools registers CRUD tools for GitLab projects.
func SetCustomHeader ¶
func SetCustomHeader(ctx context.Context, client *gitlabclient.Client, input SetCustomHeaderInput) error
SetCustomHeader sets a custom header on a project webhook.
func SetWebhookURLVariable ¶
func SetWebhookURLVariable(ctx context.Context, client *gitlabclient.Client, input SetWebhookURLVariableInput) error
SetWebhookURLVariable sets a URL variable on a project webhook.
func StartHousekeeping ¶
func StartHousekeeping(ctx context.Context, client *gitlabclient.Client, input StartHousekeepingInput) error
StartHousekeeping triggers housekeeping (git gc/repack) for a project.
func StartMirroring ¶
func StartMirroring(ctx context.Context, client *gitlabclient.Client, input StartMirroringInput) error
StartMirroring triggers an immediate pull mirror update for a project.
Types ¶
type AddHookInput ¶
type AddHookInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
URL string `json:"url" jsonschema:"Webhook URL,required"`
Name string `json:"name,omitempty" jsonschema:"Webhook name"`
Description string `json:"description,omitempty" jsonschema:"Webhook description"`
Token string `json:"token,omitempty" jsonschema:"Secret token for validation"`
PushEvents *bool `json:"push_events,omitempty" jsonschema:"Trigger on push events"`
PushEventsBranchFilter string `json:"push_events_branch_filter,omitempty" jsonschema:"Branch filter for push events"`
IssuesEvents *bool `json:"issues_events,omitempty" jsonschema:"Trigger on issue events"`
ConfidentialIssuesEvents *bool `json:"confidential_issues_events,omitempty" jsonschema:"Trigger on confidential issue events"`
MergeRequestsEvents *bool `json:"merge_requests_events,omitempty" jsonschema:"Trigger on merge request events"`
TagPushEvents *bool `json:"tag_push_events,omitempty" jsonschema:"Trigger on tag push events"`
NoteEvents *bool `json:"note_events,omitempty" jsonschema:"Trigger on note/comment events"`
ConfidentialNoteEvents *bool `json:"confidential_note_events,omitempty" jsonschema:"Trigger on confidential note events"`
JobEvents *bool `json:"job_events,omitempty" jsonschema:"Trigger on CI job events"`
PipelineEvents *bool `json:"pipeline_events,omitempty" jsonschema:"Trigger on pipeline events"`
WikiPageEvents *bool `json:"wiki_page_events,omitempty" jsonschema:"Trigger on wiki page events"`
DeploymentEvents *bool `json:"deployment_events,omitempty" jsonschema:"Trigger on deployment events"`
ReleasesEvents *bool `json:"releases_events,omitempty" jsonschema:"Trigger on release events"`
EmojiEvents *bool `json:"emoji_events,omitempty" jsonschema:"Trigger on emoji events"`
ResourceAccessTokenEvents *bool `json:"resource_access_token_events,omitempty" jsonschema:"Trigger on resource access token events"`
EnableSSLVerification *bool `json:"enable_ssl_verification,omitempty" jsonschema:"Enable SSL verification for webhook"`
CustomWebhookTemplate string `json:"custom_webhook_template,omitempty" jsonschema:"Custom webhook payload template"`
BranchFilterStrategy string `json:"branch_filter_strategy,omitempty" jsonschema:"Branch filter strategy (wildcard, regex, all_branches)"`
}
AddHookInput defines parameters for adding a webhook to a project.
type AddPushRuleInput ¶
type AddPushRuleInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
AuthorEmailRegex string `json:"author_email_regex,omitempty" jsonschema:"Regex to validate author email addresses"`
BranchNameRegex string `json:"branch_name_regex,omitempty" jsonschema:"Regex to validate branch names"`
CommitCommitterCheck *bool `json:"commit_committer_check,omitempty" jsonschema:"Reject commits where committer is not a project member"`
CommitCommitterNameCheck *bool `json:"commit_committer_name_check,omitempty" jsonschema:"Reject commits where committer name does not match user name"`
CommitMessageNegativeRegex string `json:"commit_message_negative_regex,omitempty" jsonschema:"Regex that commit messages must NOT match"`
CommitMessageRegex string `json:"commit_message_regex,omitempty" jsonschema:"Regex that commit messages must match"`
DenyDeleteTag *bool `json:"deny_delete_tag,omitempty" jsonschema:"Deny tag deletion"`
FileNameRegex string `json:"file_name_regex,omitempty" jsonschema:"Regex for disallowed file names"`
MaxFileSize *int64 `json:"max_file_size,omitempty" jsonschema:"Maximum file size (MB). 0 means unlimited"`
MemberCheck *bool `json:"member_check,omitempty" jsonschema:"Only allow commits from project members"`
PreventSecrets *bool `json:"prevent_secrets,omitempty" jsonschema:"Reject files that are likely to contain secrets"`
RejectUnsignedCommits *bool `json:"reject_unsigned_commits,omitempty" jsonschema:"Reject commits that are not GPG signed"`
RejectNonDCOCommits *bool `json:"reject_non_dco_commits,omitempty" jsonschema:"Reject commits without DCO certification"`
}
AddPushRuleInput defines parameters for adding push rules to a project.
type ApprovalConfigOutput ¶
type ApprovalConfigOutput struct {
toolutil.HintableOutput
ApprovalsBeforeMerge int64 `json:"approvals_before_merge"`
ResetApprovalsOnPush bool `json:"reset_approvals_on_push"`
DisableOverridingApproversPerMergeRequest bool `json:"disable_overriding_approvers_per_merge_request"`
MergeRequestsAuthorApproval bool `json:"merge_requests_author_approval"`
MergeRequestsDisableCommittersApproval bool `json:"merge_requests_disable_committers_approval"`
RequireReauthenticationToApprove bool `json:"require_reauthentication_to_approve"`
SelectiveCodeOwnerRemovals bool `json:"selective_code_owner_removals"`
}
ApprovalConfigOutput holds project-level approval configuration.
func ChangeApprovalConfig ¶
func ChangeApprovalConfig(ctx context.Context, client *gitlabclient.Client, input ChangeApprovalConfigInput) (ApprovalConfigOutput, error)
ChangeApprovalConfig updates the project-level approval configuration.
func GetApprovalConfig ¶
func GetApprovalConfig(ctx context.Context, client *gitlabclient.Client, input GetApprovalConfigInput) (ApprovalConfigOutput, error)
GetApprovalConfig retrieves the project-level approval configuration.
type ApprovalRuleOutput ¶
type ApprovalRuleOutput struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Name string `json:"name"`
RuleType string `json:"rule_type,omitempty"`
ReportType string `json:"report_type,omitempty"`
ApprovalsRequired int64 `json:"approvals_required"`
EligibleApprovers []string `json:"eligible_approvers,omitempty"`
Users []string `json:"users,omitempty"`
Groups []string `json:"groups,omitempty"`
ContainsHiddenGroups bool `json:"contains_hidden_groups"`
AppliesToAllProtectedBranches bool `json:"applies_to_all_protected_branches"`
}
ApprovalRuleOutput holds a single project approval rule.
func CreateApprovalRule ¶
func CreateApprovalRule(ctx context.Context, client *gitlabclient.Client, input CreateApprovalRuleInput) (ApprovalRuleOutput, error)
CreateApprovalRule creates a new project-level approval rule.
func GetApprovalRule ¶
func GetApprovalRule(ctx context.Context, client *gitlabclient.Client, input GetApprovalRuleInput) (ApprovalRuleOutput, error)
GetApprovalRule retrieves a single project-level approval rule.
func UpdateApprovalRule ¶
func UpdateApprovalRule(ctx context.Context, client *gitlabclient.Client, input UpdateApprovalRuleInput) (ApprovalRuleOutput, error)
UpdateApprovalRule updates an existing project-level approval rule.
type ArchiveInput ¶
type ArchiveInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
ArchiveInput defines parameters for archiving a project.
type ChangeApprovalConfigInput ¶
type ChangeApprovalConfigInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
ApprovalsBeforeMerge *int64 `json:"approvals_before_merge,omitempty" jsonschema:"Number of approvals required before merge"`
ResetApprovalsOnPush *bool `json:"reset_approvals_on_push,omitempty" jsonschema:"Reset approvals when new commits are pushed"`
DisableOverridingApproversPerMergeRequest *bool `json:"disable_overriding_approvers_per_merge_request,omitempty" jsonschema:"Prevent overriding approvers per MR"`
MergeRequestsAuthorApproval *bool `json:"merge_requests_author_approval,omitempty" jsonschema:"Allow MR author to approve their own MR"`
MergeRequestsDisableCommittersApproval *bool `json:"merge_requests_disable_committers_approval,omitempty" jsonschema:"Prevent MR committers from approving"`
RequireReauthenticationToApprove *bool `json:"require_reauthentication_to_approve,omitempty" jsonschema:"Require reauthentication to approve"`
SelectiveCodeOwnerRemovals *bool `json:"selective_code_owner_removals,omitempty" jsonschema:"Only remove code owner approvals when relevant files change"`
}
ChangeApprovalConfigInput defines parameters for changing approval configuration.
type ConfigurePullMirrorInput ¶
type ConfigurePullMirrorInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Enabled *bool `json:"enabled,omitempty" jsonschema:"Enable or disable pull mirroring"`
URL string `json:"url,omitempty" jsonschema:"Mirror source URL"`
AuthUser string `json:"auth_user,omitempty" jsonschema:"Authentication username for the mirror URL"`
AuthPassword string `json:"auth_password,omitempty" jsonschema:"Authentication password for the mirror URL"`
MirrorBranchRegex string `json:"mirror_branch_regex,omitempty" jsonschema:"Regex to filter branches to mirror"`
MirrorTriggerBuilds *bool `json:"mirror_trigger_builds,omitempty" jsonschema:"Trigger CI builds when mirror updates"`
OnlyMirrorProtectedBranches *bool `json:"only_mirror_protected_branches,omitempty" jsonschema:"Only mirror protected branches"`
MirrorOverwritesDivergedBranches *bool `json:"mirror_overwrites_diverged_branches,omitempty" jsonschema:"Overwrite diverged branches on mirror update"`
}
ConfigurePullMirrorInput defines parameters for configuring pull mirroring.
type CreateApprovalRuleInput ¶
type CreateApprovalRuleInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Name string `json:"name" jsonschema:"Rule name,required"`
ApprovalsRequired int64 `json:"approvals_required" jsonschema:"Number of approvals required,required"`
RuleType string `json:"rule_type,omitempty" jsonschema:"Rule type (regular, code_owner)"`
UserIDs []int64 `json:"user_ids,omitempty" jsonschema:"User IDs to assign as approvers"`
GroupIDs []int64 `json:"group_ids,omitempty" jsonschema:"Group IDs to assign as approvers"`
ProtectedBranchIDs []int64 `json:"protected_branch_ids,omitempty" jsonschema:"Protected branch IDs to scope the rule to"`
Usernames []string `json:"usernames,omitempty" jsonschema:"Usernames to assign as approvers"`
AppliesToAllProtectedBranches *bool `json:"applies_to_all_protected_branches,omitempty" jsonschema:"Apply this rule to all protected branches"`
}
CreateApprovalRuleInput defines parameters for creating an approval rule.
type CreateForUserInput ¶
type CreateForUserInput struct {
UserID int64 `json:"user_id" jsonschema:"Target user ID who will own the project,required"`
Name string `json:"name" jsonschema:"Project name,required"`
Path string `json:"path,omitempty" jsonschema:"Project path slug (defaults from name)"`
NamespaceID int `json:"namespace_id,omitempty" jsonschema:"Namespace ID (defaults to user personal namespace)"`
Description string `json:"description,omitempty" jsonschema:"Project description"`
Visibility string `json:"visibility,omitempty" jsonschema:"Visibility level (private, internal, public)"`
InitializeWithReadme bool `json:"initialize_with_readme,omitempty" jsonschema:"Initialize with a README"`
DefaultBranch string `json:"default_branch,omitempty" jsonschema:"Default branch name"`
Topics []string `json:"topics,omitempty" jsonschema:"Topic tags for the project"`
IssuesEnabled *bool `json:"issues_enabled,omitempty" jsonschema:"Enable issues feature"`
MergeRequestsEnabled *bool `json:"merge_requests_enabled,omitempty" jsonschema:"Enable merge requests feature"`
WikiEnabled *bool `json:"wiki_enabled,omitempty" jsonschema:"Enable wiki feature"`
JobsEnabled *bool `json:"jobs_enabled,omitempty" jsonschema:"Enable CI/CD jobs"`
}
CreateForUserInput defines parameters for creating a project on behalf of a user.
type CreateForkRelationInput ¶
type CreateForkRelationInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path of the forked project,required"`
ForkedFromID int64 `json:"forked_from_id" jsonschema:"ID of the project to set as the fork source,required"`
}
CreateForkRelationInput defines parameters for creating a fork relation.
type CreateInput ¶
type CreateInput struct {
// Basic metadata
Name string `json:"name" jsonschema:"Project name,required"`
Path string `json:"path,omitempty" jsonschema:"Project path slug (defaults from name)"`
NamespaceID int `json:"namespace_id,omitempty" jsonschema:"Namespace ID (defaults to personal namespace)"`
Description string `json:"description,omitempty" jsonschema:"Project description"`
Visibility string `json:"visibility,omitempty" jsonschema:"Visibility level (private, internal, public)"`
InitializeWithReadme bool `json:"initialize_with_readme,omitempty" jsonschema:"Initialize with a README"`
DefaultBranch string `json:"default_branch,omitempty" jsonschema:"Default branch name"`
Topics []string `json:"topics,omitempty" jsonschema:"Topic tags for the project"`
ImportURL string `json:"import_url,omitempty" jsonschema:"URL to import repository from"`
// Merge settings
MergeMethod string `json:"merge_method,omitempty" jsonschema:"Merge method (merge, rebase_merge, ff)"`
SquashOption string `json:"squash_option,omitempty" jsonschema:"Squash option (never, always, default_on, default_off)"`
OnlyAllowMergeIfPipelineSucceeds bool `json:"only_allow_merge_if_pipeline_succeeds,omitempty" jsonschema:"Only allow merge when pipeline succeeds"`
OnlyAllowMergeIfAllDiscussionsAreResolved bool `` /* 129-byte string literal not displayed */
AllowMergeOnSkippedPipeline *bool `json:"allow_merge_on_skipped_pipeline,omitempty" jsonschema:"Allow merge when pipeline is skipped"`
RemoveSourceBranchAfterMerge *bool `json:"remove_source_branch_after_merge,omitempty" jsonschema:"Remove source branch after merge by default"`
AutocloseReferencedIssues *bool `json:"autoclose_referenced_issues,omitempty" jsonschema:"Auto-close referenced issues on merge"`
SuggestionCommitMessage string `json:"suggestion_commit_message,omitempty" jsonschema:"Default commit message for suggestions"`
// Feature toggles
IssuesEnabled *bool `json:"issues_enabled,omitempty" jsonschema:"Enable issues feature"`
MergeRequestsEnabled *bool `json:"merge_requests_enabled,omitempty" jsonschema:"Enable merge requests feature"`
WikiEnabled *bool `json:"wiki_enabled,omitempty" jsonschema:"Enable wiki feature"`
JobsEnabled *bool `json:"jobs_enabled,omitempty" jsonschema:"Enable CI/CD jobs"`
LFSEnabled *bool `json:"lfs_enabled,omitempty" jsonschema:"Enable Git LFS"`
PackagesEnabled *bool `json:"packages_enabled,omitempty" jsonschema:"Enable packages feature (deprecated: use package_registry_access_level)"`
PackageRegistryAccessLevel string `json:"package_registry_access_level,omitempty" jsonschema:"Package registry access level (disabled, private, enabled)"`
// CI/CD settings
CIConfigPath string `json:"ci_config_path,omitempty" jsonschema:"Custom CI/CD configuration file path"`
BuildTimeout int64 `json:"build_timeout,omitempty" jsonschema:"Build timeout in seconds"`
CIForwardDeploymentEnabled *bool `json:"ci_forward_deployment_enabled,omitempty" jsonschema:"Enable CI/CD forward deployment"`
PublicBuilds *bool `json:"public_builds,omitempty" jsonschema:"Enable public access to pipelines"`
// Access control
RequestAccessEnabled *bool `json:"request_access_enabled,omitempty" jsonschema:"Allow users to request access"`
PagesAccessLevel string `json:"pages_access_level,omitempty" jsonschema:"Pages access level (disabled, private, enabled, public)"`
ContainerRegistryAccessLevel string `json:"container_registry_access_level,omitempty" jsonschema:"Container registry access level (disabled, private, enabled)"`
SnippetsAccessLevel string `json:"snippets_access_level,omitempty" jsonschema:"Snippets access level (disabled, private, enabled)"`
}
CreateInput defines parameters for creating a GitLab project.
type DeleteApprovalRuleInput ¶
type DeleteApprovalRuleInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
RuleID int64 `json:"rule_id" jsonschema:"Approval rule ID to delete,required"`
}
DeleteApprovalRuleInput defines parameters for deleting an approval rule.
type DeleteCustomHeaderInput ¶
type DeleteCustomHeaderInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
HookID int64 `json:"hook_id" jsonschema:"Webhook ID,required"`
Key string `json:"key" jsonschema:"Custom header key name to delete,required"`
}
DeleteCustomHeaderInput defines parameters for deleting a custom header from a webhook.
type DeleteForkRelationInput ¶
type DeleteForkRelationInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
DeleteForkRelationInput defines parameters for deleting a fork relation.
type DeleteHookInput ¶
type DeleteHookInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
HookID int64 `json:"hook_id" jsonschema:"Webhook ID to delete,required"`
}
DeleteHookInput defines parameters for deleting a project webhook.
type DeleteInput ¶
type DeleteInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
PermanentlyRemove bool `` /* 185-byte string literal not displayed */
FullPath string `` /* 136-byte string literal not displayed */
}
DeleteInput defines parameters for deleting a project.
type DeleteOutput ¶
type DeleteOutput struct {
toolutil.HintableOutput
Status string `json:"status"`
Message string `json:"message"`
MarkedForDeletionOn string `json:"marked_for_deletion_on,omitempty"`
PermanentlyRemoved bool `json:"permanently_removed"`
}
DeleteOutput holds the result of a project deletion request.
func Delete ¶
func Delete(ctx context.Context, client *gitlabclient.Client, input DeleteInput) (DeleteOutput, error)
Delete deletes a GitLab project by its ID or URL-encoded path. When the GitLab instance has delayed deletion enabled, the project is marked for deletion rather than removed immediately. When permanently_remove is true and the instance requires a two-step process (mark-then-remove), the handler performs both steps automatically.
type DeletePushRuleInput ¶
type DeletePushRuleInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
DeletePushRuleInput defines parameters for deleting push rules from a project.
type DeleteSharedGroupInput ¶
type DeleteSharedGroupInput struct {
}
DeleteSharedGroupInput defines parameters for removing a group share from a project.
type DeleteWebhookURLVariableInput ¶
type DeleteWebhookURLVariableInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
HookID int64 `json:"hook_id" jsonschema:"Webhook ID,required"`
Key string `json:"key" jsonschema:"URL variable key name to delete,required"`
}
DeleteWebhookURLVariableInput defines parameters for deleting a URL variable from a webhook.
type DownloadAvatarInput ¶
type DownloadAvatarInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
DownloadAvatarInput defines parameters for downloading a project avatar.
type DownloadAvatarOutput ¶
type DownloadAvatarOutput struct {
toolutil.HintableOutput
ContentBase64 string `json:"content_base64"`
SizeBytes int `json:"size_bytes"`
}
DownloadAvatarOutput holds the result of downloading a project avatar.
func DownloadAvatar ¶
func DownloadAvatar(ctx context.Context, client *gitlabclient.Client, input DownloadAvatarInput) (DownloadAvatarOutput, error)
DownloadAvatar downloads the avatar image for a project as base64-encoded data.
type EditHookInput ¶
type EditHookInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
HookID int64 `json:"hook_id" jsonschema:"Webhook ID to edit,required"`
URL string `json:"url,omitempty" jsonschema:"Updated webhook URL"`
Name string `json:"name,omitempty" jsonschema:"Updated webhook name"`
Description string `json:"description,omitempty" jsonschema:"Updated webhook description"`
Token string `json:"token,omitempty" jsonschema:"Updated secret token"`
PushEvents *bool `json:"push_events,omitempty" jsonschema:"Trigger on push events"`
PushEventsBranchFilter string `json:"push_events_branch_filter,omitempty" jsonschema:"Branch filter for push events"`
IssuesEvents *bool `json:"issues_events,omitempty" jsonschema:"Trigger on issue events"`
ConfidentialIssuesEvents *bool `json:"confidential_issues_events,omitempty" jsonschema:"Trigger on confidential issue events"`
MergeRequestsEvents *bool `json:"merge_requests_events,omitempty" jsonschema:"Trigger on merge request events"`
TagPushEvents *bool `json:"tag_push_events,omitempty" jsonschema:"Trigger on tag push events"`
NoteEvents *bool `json:"note_events,omitempty" jsonschema:"Trigger on note/comment events"`
ConfidentialNoteEvents *bool `json:"confidential_note_events,omitempty" jsonschema:"Trigger on confidential note events"`
JobEvents *bool `json:"job_events,omitempty" jsonschema:"Trigger on CI job events"`
PipelineEvents *bool `json:"pipeline_events,omitempty" jsonschema:"Trigger on pipeline events"`
WikiPageEvents *bool `json:"wiki_page_events,omitempty" jsonschema:"Trigger on wiki page events"`
DeploymentEvents *bool `json:"deployment_events,omitempty" jsonschema:"Trigger on deployment events"`
ReleasesEvents *bool `json:"releases_events,omitempty" jsonschema:"Trigger on release events"`
EmojiEvents *bool `json:"emoji_events,omitempty" jsonschema:"Trigger on emoji events"`
ResourceAccessTokenEvents *bool `json:"resource_access_token_events,omitempty" jsonschema:"Trigger on resource access token events"`
EnableSSLVerification *bool `json:"enable_ssl_verification,omitempty" jsonschema:"Enable SSL verification"`
CustomWebhookTemplate string `json:"custom_webhook_template,omitempty" jsonschema:"Custom webhook payload template"`
BranchFilterStrategy string `json:"branch_filter_strategy,omitempty" jsonschema:"Branch filter strategy (wildcard, regex, all_branches)"`
}
EditHookInput defines parameters for editing a project webhook.
type EditPushRuleInput ¶
type EditPushRuleInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
AuthorEmailRegex *string `json:"author_email_regex,omitempty" jsonschema:"Regex to validate author email addresses"`
BranchNameRegex *string `json:"branch_name_regex,omitempty" jsonschema:"Regex to validate branch names"`
CommitCommitterCheck *bool `json:"commit_committer_check,omitempty" jsonschema:"Reject commits where committer is not a project member"`
CommitCommitterNameCheck *bool `json:"commit_committer_name_check,omitempty" jsonschema:"Reject commits where committer name does not match user name"`
CommitMessageNegativeRegex *string `json:"commit_message_negative_regex,omitempty" jsonschema:"Regex that commit messages must NOT match"`
CommitMessageRegex *string `json:"commit_message_regex,omitempty" jsonschema:"Regex that commit messages must match"`
DenyDeleteTag *bool `json:"deny_delete_tag,omitempty" jsonschema:"Deny tag deletion"`
FileNameRegex *string `json:"file_name_regex,omitempty" jsonschema:"Regex for disallowed file names"`
MaxFileSize *int64 `json:"max_file_size,omitempty" jsonschema:"Maximum file size (MB). 0 means unlimited"`
MemberCheck *bool `json:"member_check,omitempty" jsonschema:"Only allow commits from project members"`
PreventSecrets *bool `json:"prevent_secrets,omitempty" jsonschema:"Reject files that are likely to contain secrets"`
RejectUnsignedCommits *bool `json:"reject_unsigned_commits,omitempty" jsonschema:"Reject commits that are not GPG signed"`
RejectNonDCOCommits *bool `json:"reject_non_dco_commits,omitempty" jsonschema:"Reject commits without DCO certification"`
}
EditPushRuleInput defines parameters for editing push rules on a project.
type ForkInput ¶
type ForkInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Source project ID or URL-encoded path,required"`
Name string `json:"name,omitempty" jsonschema:"Name for the forked project"`
Path string `json:"path,omitempty" jsonschema:"Path slug for the forked project"`
NamespaceID int64 `json:"namespace_id,omitempty" jsonschema:"Namespace ID to fork into"`
NamespacePath string `json:"namespace_path,omitempty" jsonschema:"Namespace path to fork into"`
Description string `json:"description,omitempty" jsonschema:"Description for the forked project"`
Visibility string `json:"visibility,omitempty" jsonschema:"Visibility level (private, internal, public)"`
Branches string `json:"branches,omitempty" jsonschema:"Branches to fork (empty=all)"`
MergeRequestDefaultTargetSelf *bool `json:"mr_default_target_self,omitempty" jsonschema:"MR default target is the fork itself instead of upstream"`
}
ForkInput defines parameters for forking a project.
type ForkRelationOutput ¶
type ForkRelationOutput struct {
toolutil.HintableOutput
ID int64 `json:"id"`
ForkedToProjectID int64 `json:"forked_to_project_id"`
ForkedFromProjectID int64 `json:"forked_from_project_id"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
}
ForkRelationOutput holds the result of a fork relation operation.
func CreateForkRelation ¶
func CreateForkRelation(ctx context.Context, client *gitlabclient.Client, input CreateForkRelationInput) (ForkRelationOutput, error)
CreateForkRelation creates a fork relation between two projects.
type GetApprovalConfigInput ¶
type GetApprovalConfigInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
GetApprovalConfigInput defines parameters for getting approval configuration.
type GetApprovalRuleInput ¶
type GetApprovalRuleInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
RuleID int64 `json:"rule_id" jsonschema:"Approval rule ID,required"`
}
GetApprovalRuleInput defines parameters for getting a specific approval rule.
type GetHookInput ¶
type GetHookInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
HookID int64 `json:"hook_id" jsonschema:"Webhook ID,required"`
}
GetHookInput defines parameters for getting a single project webhook.
type GetInput ¶
type GetInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path (e.g. 'user/repo' or 42),required"`
Statistics *bool `json:"statistics,omitempty" jsonschema:"Include project statistics (commit count, storage sizes)"`
License *bool `json:"license,omitempty" jsonschema:"Include license information in response"`
WithCustomAttributes *bool `json:"with_custom_attributes,omitempty" jsonschema:"Include custom attributes in response"`
}
GetInput defines parameters for retrieving a project.
type GetLanguagesInput ¶
type GetLanguagesInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
GetLanguagesInput defines parameters for retrieving project languages.
type GetPullMirrorInput ¶
type GetPullMirrorInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
GetPullMirrorInput defines parameters for getting pull mirror details.
type GetPushRulesInput ¶
type GetPushRulesInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
GetPushRulesInput defines parameters for getting project push rules.
type GetRepositoryStorageInput ¶
type GetRepositoryStorageInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
GetRepositoryStorageInput defines parameters for getting repository storage info.
type HookOutput ¶
type HookOutput struct {
toolutil.HintableOutput
ID int64 `json:"id"`
URL string `json:"url"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
ProjectID int64 `json:"project_id"`
PushEvents bool `json:"push_events"`
PushEventsBranchFilter string `json:"push_events_branch_filter,omitempty"`
IssuesEvents bool `json:"issues_events"`
ConfidentialIssuesEvents bool `json:"confidential_issues_events"`
MergeRequestsEvents bool `json:"merge_requests_events"`
TagPushEvents bool `json:"tag_push_events"`
NoteEvents bool `json:"note_events"`
ConfidentialNoteEvents bool `json:"confidential_note_events"`
JobEvents bool `json:"job_events"`
PipelineEvents bool `json:"pipeline_events"`
WikiPageEvents bool `json:"wiki_page_events"`
DeploymentEvents bool `json:"deployment_events"`
ReleasesEvents bool `json:"releases_events"`
MilestoneEvents bool `json:"milestone_events"`
FeatureFlagEvents bool `json:"feature_flag_events"`
EmojiEvents bool `json:"emoji_events"`
EnableSSLVerification bool `json:"enable_ssl_verification"`
RepositoryUpdateEvents bool `json:"repository_update_events"`
ResourceAccessTokenEvents bool `json:"resource_access_token_events"`
AlertStatus string `json:"alert_status,omitempty"`
BranchFilterStrategy string `json:"branch_filter_strategy,omitempty"`
CustomWebhookTemplate string `json:"custom_webhook_template,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
HookOutput represents a project webhook.
func AddHook ¶
func AddHook(ctx context.Context, client *gitlabclient.Client, input AddHookInput) (HookOutput, error)
AddHook adds a webhook to a project.
func EditHook ¶
func EditHook(ctx context.Context, client *gitlabclient.Client, input EditHookInput) (HookOutput, error)
EditHook edits an existing project webhook.
func GetHook ¶
func GetHook(ctx context.Context, client *gitlabclient.Client, input GetHookInput) (HookOutput, error)
GetHook retrieves a single project webhook by ID.
type LanguageEntry ¶
LanguageEntry represents a single programming language and its percentage.
type LanguagesOutput ¶
type LanguagesOutput struct {
toolutil.HintableOutput
Languages []LanguageEntry `json:"languages"`
}
LanguagesOutput holds the programming languages detected in a project.
func GetLanguages ¶
func GetLanguages(ctx context.Context, client *gitlabclient.Client, input GetLanguagesInput) (LanguagesOutput, error)
GetLanguages retrieves the programming languages used in a project with percentages.
type ListApprovalRulesInput ¶
type ListApprovalRulesInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
toolutil.PaginationInput
}
ListApprovalRulesInput defines parameters for listing project approval rules.
type ListApprovalRulesOutput ¶
type ListApprovalRulesOutput struct {
toolutil.HintableOutput
Rules []ApprovalRuleOutput `json:"rules"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListApprovalRulesOutput holds a paginated list of project approval rules.
func ListApprovalRules ¶
func ListApprovalRules(ctx context.Context, client *gitlabclient.Client, input ListApprovalRulesInput) (ListApprovalRulesOutput, error)
ListApprovalRules retrieves all project-level approval rules.
type ListForksInput ¶
type ListForksInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Owned bool `json:"owned,omitempty" jsonschema:"Limit to forks owned by the current user"`
Search string `json:"search,omitempty" jsonschema:"Search query for fork name"`
Visibility string `json:"visibility,omitempty" jsonschema:"Filter by visibility (private, internal, public)"`
OrderBy string `json:"order_by,omitempty" jsonschema:"Order by field (id, name, path, created_at, updated_at, last_activity_at)"`
Sort string `json:"sort,omitempty" jsonschema:"Sort direction (asc, desc)"`
toolutil.PaginationInput
}
ListForksInput defines parameters for listing project forks.
type ListForksOutput ¶
type ListForksOutput struct {
toolutil.HintableOutput
Forks []Output `json:"forks"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListForksOutput holds a paginated list of project forks.
func ListForks ¶
func ListForks(ctx context.Context, client *gitlabclient.Client, input ListForksInput) (ListForksOutput, error)
ListForks retrieves a paginated list of forks for a project.
type ListHooksInput ¶
type ListHooksInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
toolutil.PaginationInput
}
ListHooksInput defines parameters for listing project webhooks.
type ListHooksOutput ¶
type ListHooksOutput struct {
toolutil.HintableOutput
Hooks []HookOutput `json:"hooks"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListHooksOutput holds a paginated list of project webhooks.
func ListHooks ¶
func ListHooks(ctx context.Context, client *gitlabclient.Client, input ListHooksInput) (ListHooksOutput, error)
ListHooks retrieves all webhooks for a project.
type ListInput ¶
type ListInput struct {
Owned bool `json:"owned,omitempty" jsonschema:"Limit to projects explicitly owned by the current user"`
Search string `json:"search,omitempty" jsonschema:"Search query for project name"`
Visibility string `json:"visibility,omitempty" jsonschema:"Filter by visibility (private, internal, public)"`
Archived *bool `json:"archived,omitempty" jsonschema:"Filter by archived status (true=only archived, false=only active)"`
OrderBy string `json:"order_by,omitempty" jsonschema:"Order by field (id, name, path, created_at, updated_at, last_activity_at)"`
Sort string `json:"sort,omitempty" jsonschema:"Sort direction (asc, desc)"`
Topic string `json:"topic,omitempty" jsonschema:"Filter by topic name"`
Simple bool `json:"simple,omitempty" jsonschema:"Return only limited fields (faster for large result sets)"`
MinAccessLevel int `` /* 136-byte string literal not displayed */
LastActivityAfter string `json:"last_activity_after,omitempty" jsonschema:"Return projects with last activity after date (ISO 8601 format)"`
LastActivityBefore string `json:"last_activity_before,omitempty" jsonschema:"Return projects with last activity before date (ISO 8601 format)"`
Starred *bool `json:"starred,omitempty" jsonschema:"Limit to projects starred by the current user"`
Membership *bool `json:"membership,omitempty" jsonschema:"Limit to projects where current user is a member"`
WithIssuesEnabled *bool `json:"with_issues_enabled,omitempty" jsonschema:"Filter by projects with issues feature enabled"`
WithMergeRequestsEnabled *bool `json:"with_merge_requests_enabled,omitempty" jsonschema:"Filter by projects with merge requests enabled"`
SearchNamespaces *bool `json:"search_namespaces,omitempty" jsonschema:"Include namespace in search"`
Statistics *bool `json:"statistics,omitempty" jsonschema:"Include project statistics in response"`
WithProgrammingLanguage string `json:"with_programming_language,omitempty" jsonschema:"Filter by programming language name"`
IncludePendingDelete *bool `` /* 127-byte string literal not displayed */
IncludeHidden *bool `json:"include_hidden,omitempty" jsonschema:"Include hidden projects in results"`
IDAfter int64 `json:"id_after,omitempty" jsonschema:"Return projects with ID greater than this value (keyset pagination)"`
IDBefore int64 `json:"id_before,omitempty" jsonschema:"Return projects with ID less than this value (keyset pagination)"`
toolutil.PaginationInput
}
ListInput defines filters for listing projects.
type ListInvitedGroupsInput ¶
type ListInvitedGroupsInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Search string `json:"search,omitempty" jsonschema:"Search by group name"`
MinAccessLevel int `` /* 136-byte string literal not displayed */
toolutil.PaginationInput
}
ListInvitedGroupsInput defines parameters for listing groups invited to a project.
type ListOutput ¶
type ListOutput struct {
toolutil.HintableOutput
Projects []Output `json:"projects"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListOutput holds a paginated list of projects.
func List ¶
func List(ctx context.Context, client *gitlabclient.Client, input ListInput) (ListOutput, error)
List retrieves a paginated list of GitLab projects.
func ListUserContributedProjects ¶
func ListUserContributedProjects(ctx context.Context, client *gitlabclient.Client, input ListUserContributedProjectsInput) (ListOutput, error)
ListUserContributedProjects lists projects a specific user has contributed to.
func ListUserProjects ¶
func ListUserProjects(ctx context.Context, client *gitlabclient.Client, input ListUserProjectsInput) (ListOutput, error)
ListUserProjects lists projects owned by the given user.
func ListUserStarredProjects ¶
func ListUserStarredProjects(ctx context.Context, client *gitlabclient.Client, input ListUserStarredProjectsInput) (ListOutput, error)
ListUserStarredProjects lists projects starred by a specific user.
type ListProjectGroupsInput ¶
type ListProjectGroupsInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Search string `json:"search,omitempty" jsonschema:"Search by group name"`
SkipGroups []int64 `json:"skip_groups,omitempty" jsonschema:"Array of group IDs to exclude"`
toolutil.PaginationInput
}
ListProjectGroupsInput defines parameters for listing a project's ancestor groups.
type ListProjectGroupsOutput ¶
type ListProjectGroupsOutput struct {
toolutil.HintableOutput
Groups []ProjectGroupOutput `json:"groups"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListProjectGroupsOutput holds a paginated list of project groups.
func ListInvitedGroups ¶
func ListInvitedGroups(ctx context.Context, client *gitlabclient.Client, input ListInvitedGroupsInput) (ListProjectGroupsOutput, error)
ListInvitedGroups lists groups that have been invited to the given project.
func ListProjectGroups ¶
func ListProjectGroups(ctx context.Context, client *gitlabclient.Client, input ListProjectGroupsInput) (ListProjectGroupsOutput, error)
ListProjectGroups lists the ancestor groups of the given project.
type ListProjectStarrersInput ¶
type ListProjectStarrersInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Search string `json:"search,omitempty" jsonschema:"Search by name or username"`
toolutil.PaginationInput
}
ListProjectStarrersInput defines parameters for listing project starrers.
type ListProjectStarrersOutput ¶
type ListProjectStarrersOutput struct {
toolutil.HintableOutput
Starrers []StarrerOutput `json:"starrers"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListProjectStarrersOutput holds a paginated list of project starrers.
func ListProjectStarrers ¶
func ListProjectStarrers(ctx context.Context, client *gitlabclient.Client, input ListProjectStarrersInput) (ListProjectStarrersOutput, error)
ListProjectStarrers lists users who have starred the given project.
type ListProjectUsersInput ¶
type ListProjectUsersInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Search string `json:"search,omitempty" jsonschema:"Search by name or username"`
toolutil.PaginationInput
}
ListProjectUsersInput defines parameters for listing users of a project.
type ListProjectUsersOutput ¶
type ListProjectUsersOutput struct {
toolutil.HintableOutput
Users []ProjectUserOutput `json:"users"`
Pagination toolutil.PaginationOutput `json:"pagination"`
}
ListProjectUsersOutput holds a paginated list of project users.
func ListProjectUsers ¶
func ListProjectUsers(ctx context.Context, client *gitlabclient.Client, input ListProjectUsersInput) (ListProjectUsersOutput, error)
ListProjectUsers lists users who are members of the given project.
type ListUserContributedProjectsInput ¶
type ListUserContributedProjectsInput struct {
UserID toolutil.StringOrInt `json:"user_id" jsonschema:"User ID or username,required"`
Search string `json:"search,omitempty" jsonschema:"Search query for project name"`
Visibility string `json:"visibility,omitempty" jsonschema:"Filter by visibility (private, internal, public)"`
Archived *bool `json:"archived,omitempty" jsonschema:"Filter by archived status"`
OrderBy string `json:"order_by,omitempty" jsonschema:"Order by field (id, name, path, created_at, updated_at, last_activity_at)"`
Sort string `json:"sort,omitempty" jsonschema:"Sort direction (asc, desc)"`
Simple bool `json:"simple,omitempty" jsonschema:"Return only limited fields (faster)"`
toolutil.PaginationInput
}
ListUserContributedProjectsInput defines parameters for listing contributed projects.
type ListUserProjectsInput ¶
type ListUserProjectsInput struct {
UserID toolutil.StringOrInt `json:"user_id" jsonschema:"User ID or username,required"`
Search string `json:"search,omitempty" jsonschema:"Search query for project name"`
Visibility string `json:"visibility,omitempty" jsonschema:"Filter by visibility (private, internal, public)"`
Archived *bool `json:"archived,omitempty" jsonschema:"Filter by archived status"`
OrderBy string `json:"order_by,omitempty" jsonschema:"Order by field (id, name, path, created_at, updated_at, last_activity_at)"`
Sort string `json:"sort,omitempty" jsonschema:"Sort direction (asc, desc)"`
Simple bool `json:"simple,omitempty" jsonschema:"Return only limited fields (faster)"`
toolutil.PaginationInput
}
ListUserProjectsInput defines parameters for listing projects owned by a specific user.
type ListUserStarredProjectsInput ¶
type ListUserStarredProjectsInput struct {
UserID toolutil.StringOrInt `json:"user_id" jsonschema:"User ID or username,required"`
Search string `json:"search,omitempty" jsonschema:"Search query for project name"`
Visibility string `json:"visibility,omitempty" jsonschema:"Filter by visibility (private, internal, public)"`
Archived *bool `json:"archived,omitempty" jsonschema:"Filter by archived status"`
OrderBy string `json:"order_by,omitempty" jsonschema:"Order by field (id, name, path, created_at, updated_at, last_activity_at)"`
Sort string `json:"sort,omitempty" jsonschema:"Sort direction (asc, desc)"`
Simple bool `json:"simple,omitempty" jsonschema:"Return only limited fields (faster)"`
toolutil.PaginationInput
}
ListUserStarredProjectsInput defines parameters for listing starred projects.
type Output ¶
type Output struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
PathWithNamespace string `json:"path_with_namespace"`
NameWithNamespace string `json:"name_with_namespace,omitempty"`
Visibility string `json:"visibility"`
DefaultBranch string `json:"default_branch"`
WebURL string `json:"web_url"`
Description string `json:"description"`
Archived bool `json:"archived"`
EmptyRepo bool `json:"empty_repo,omitempty"`
ForksCount int64 `json:"forks_count,omitempty"`
StarCount int64 `json:"star_count,omitempty"`
OpenIssuesCount int64 `json:"open_issues_count,omitempty"`
HTTPURLToRepo string `json:"http_url_to_repo,omitempty"`
SSHURLToRepo string `json:"ssh_url_to_repo,omitempty"`
Namespace string `json:"namespace,omitempty"`
Topics []string `json:"topics"`
MergeMethod string `json:"merge_method,omitempty"`
SquashOption string `json:"squash_option,omitempty"`
OnlyAllowMergeIfPipelineSucceeds bool `json:"only_allow_merge_if_pipeline_succeeds"`
OnlyAllowMergeIfAllDiscussionsAreResolved bool `json:"only_allow_merge_if_all_discussions_are_resolved"`
RemoveSourceBranchAfterMerge bool `json:"remove_source_branch_after_merge"`
ForkedFromProject string `json:"forked_from_project,omitempty"`
MarkedForDeletionOn string `json:"marked_for_deletion_on,omitempty"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at,omitempty"`
LastActivityAt string `json:"last_activity_at,omitempty"`
ReadmeURL string `json:"readme_url,omitempty"`
AvatarURL string `json:"avatar_url,omitempty"`
CreatorID int64 `json:"creator_id,omitempty"`
RequestAccessEnabled bool `json:"request_access_enabled"`
IssuesEnabled bool `json:"issues_enabled"`
MergeRequestsEnabled bool `json:"merge_requests_enabled"`
WikiEnabled bool `json:"wiki_enabled"`
JobsEnabled bool `json:"jobs_enabled"`
LFSEnabled bool `json:"lfs_enabled"`
CIConfigPath string `json:"ci_config_path,omitempty"`
AllowMergeOnSkippedPipeline bool `json:"allow_merge_on_skipped_pipeline"`
MergePipelinesEnabled bool `json:"merge_pipelines_enabled"`
MergeTrainsEnabled bool `json:"merge_trains_enabled"`
MergeCommitTemplate string `json:"merge_commit_template,omitempty"`
SquashCommitTemplate string `json:"squash_commit_template,omitempty"`
AutocloseReferencedIssues bool `json:"autoclose_referenced_issues"`
ApprovalsBeforeMerge int64 `json:"approvals_before_merge,omitempty"`
ResolveOutdatedDiffDiscussions bool `json:"resolve_outdated_diff_discussions"`
ContainerRegistryEnabled bool `json:"container_registry_enabled,omitempty"`
PublicBuilds bool `json:"public_builds,omitempty"`
SnippetsEnabled bool `json:"snippets_enabled,omitempty"`
PackagesEnabled bool `json:"packages_enabled,omitempty"`
PackageRegistryAccessLevel string `json:"package_registry_access_level,omitempty"`
BuildTimeout int64 `json:"build_timeout,omitempty"`
SuggestionCommitMessage string `json:"suggestion_commit_message,omitempty"`
ComplianceFrameworks []string `json:"compliance_frameworks,omitempty"`
ImportURL string `json:"import_url,omitempty"`
MergeRequestTitleRegex string `json:"merge_request_title_regex,omitempty"`
MergeRequestTitleRegexDescription string `json:"merge_request_title_regex_description,omitempty"`
}
Output is the common output for project operations.
func Archive ¶
func Archive(ctx context.Context, client *gitlabclient.Client, input ArchiveInput) (Output, error)
Archive sets a project to archived (read-only) state.
func Create ¶
func Create(ctx context.Context, client *gitlabclient.Client, input CreateInput) (Output, error)
Create creates a new GitLab project with the specified settings.
func CreateForUser ¶
func CreateForUser(ctx context.Context, client *gitlabclient.Client, input CreateForUserInput) (Output, error)
CreateForUser creates a new project owned by the specified user (admin operation).
func Restore ¶
func Restore(ctx context.Context, client *gitlabclient.Client, input RestoreInput) (Output, error)
Restore restores a GitLab project that has been marked for deletion.
func ToOutput ¶
ToOutput converts a GitLab API gl.Project to the MCP tool output format, mapping visibility to its string representation.
func Transfer ¶
func Transfer(ctx context.Context, client *gitlabclient.Client, input TransferInput) (Output, error)
Transfer moves a project to a different namespace.
func Unarchive ¶
func Unarchive(ctx context.Context, client *gitlabclient.Client, input UnarchiveInput) (Output, error)
Unarchive removes the archived (read-only) state from a project.
func Unstar ¶
func Unstar(ctx context.Context, client *gitlabclient.Client, input UnstarInput) (Output, error)
Unstar removes the star from a project for the authenticated user.
func Update ¶
func Update(ctx context.Context, client *gitlabclient.Client, input UpdateInput) (Output, error)
Update modifies settings on an existing GitLab project.
func UploadAvatar ¶
func UploadAvatar(ctx context.Context, client *gitlabclient.Client, input UploadAvatarInput) (Output, error)
UploadAvatar uploads or replaces the avatar for a project. Accepts either file_path (local file) or content_base64 (base64-encoded string).
type ProjectGroupOutput ¶
type ProjectGroupOutput struct {
ID int64 `json:"id"`
Name string `json:"name"`
AvatarURL string `json:"avatar_url,omitempty"`
WebURL string `json:"web_url,omitempty"`
FullName string `json:"full_name"`
FullPath string `json:"full_path"`
}
ProjectGroupOutput represents a group associated with a project.
type ProjectUserOutput ¶
type ProjectUserOutput struct {
ID int64 `json:"id"`
Name string `json:"name"`
Username string `json:"username"`
State string `json:"state"`
AvatarURL string `json:"avatar_url,omitempty"`
WebURL string `json:"web_url,omitempty"`
}
ProjectUserOutput represents a project user.
type PullMirrorOutput ¶
type PullMirrorOutput struct {
toolutil.HintableOutput
ID int64 `json:"id"`
Enabled bool `json:"enabled"`
URL string `json:"url,omitempty"`
UpdateStatus string `json:"update_status,omitempty"`
LastError string `json:"last_error,omitempty"`
LastSuccessfulUpdateAt string `json:"last_successful_update_at,omitempty"`
LastUpdateAt string `json:"last_update_at,omitempty"`
LastUpdateStartedAt string `json:"last_update_started_at,omitempty"`
MirrorTriggerBuilds bool `json:"mirror_trigger_builds"`
OnlyMirrorProtectedBranches bool `json:"only_mirror_protected_branches"`
MirrorOverwritesDivergedBranches bool `json:"mirror_overwrites_diverged_branches"`
MirrorBranchRegex string `json:"mirror_branch_regex,omitempty"`
}
PullMirrorOutput holds pull mirror configuration details.
func ConfigurePullMirror ¶
func ConfigurePullMirror(ctx context.Context, client *gitlabclient.Client, input ConfigurePullMirrorInput) (PullMirrorOutput, error)
ConfigurePullMirror sets up or updates pull mirroring for a project.
func GetPullMirror ¶
func GetPullMirror(ctx context.Context, client *gitlabclient.Client, input GetPullMirrorInput) (PullMirrorOutput, error)
GetPullMirror retrieves pull mirror configuration for a project.
type PushRuleOutput ¶
type PushRuleOutput struct {
toolutil.HintableOutput
ID int64 `json:"id"`
ProjectID int64 `json:"project_id"`
CommitMessageRegex string `json:"commit_message_regex,omitempty"`
CommitMessageNegativeRegex string `json:"commit_message_negative_regex,omitempty"`
BranchNameRegex string `json:"branch_name_regex,omitempty"`
DenyDeleteTag bool `json:"deny_delete_tag"`
MemberCheck bool `json:"member_check"`
PreventSecrets bool `json:"prevent_secrets"`
AuthorEmailRegex string `json:"author_email_regex,omitempty"`
FileNameRegex string `json:"file_name_regex,omitempty"`
MaxFileSize int64 `json:"max_file_size"`
CommitCommitterCheck bool `json:"commit_committer_check"`
CommitCommitterNameCheck bool `json:"commit_committer_name_check"`
RejectUnsignedCommits bool `json:"reject_unsigned_commits"`
RejectNonDCOCommits bool `json:"reject_non_dco_commits"`
CreatedAt string `json:"created_at,omitempty"`
}
PushRuleOutput represents a project's push rule configuration.
func AddPushRule ¶
func AddPushRule(ctx context.Context, client *gitlabclient.Client, input AddPushRuleInput) (PushRuleOutput, error)
AddPushRule adds push rule configuration to a project.
func EditPushRule ¶
func EditPushRule(ctx context.Context, client *gitlabclient.Client, input EditPushRuleInput) (PushRuleOutput, error)
EditPushRule modifies the push rule configuration for a project.
func GetPushRules ¶
func GetPushRules(ctx context.Context, client *gitlabclient.Client, input GetPushRulesInput) (PushRuleOutput, error)
GetPushRules retrieves the push rule configuration for a project.
type RepositoryStorageOutput ¶
type RepositoryStorageOutput struct {
toolutil.HintableOutput
ProjectID int64 `json:"project_id"`
DiskPath string `json:"disk_path"`
RepositoryStorage string `json:"repository_storage"`
CreatedAt string `json:"created_at,omitempty"`
}
RepositoryStorageOutput holds repository storage information.
func GetRepositoryStorage ¶
func GetRepositoryStorage(ctx context.Context, client *gitlabclient.Client, input GetRepositoryStorageInput) (RepositoryStorageOutput, error)
GetRepositoryStorage retrieves repository storage information for a project.
type RestoreInput ¶
type RestoreInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path of the project marked for deletion,required"`
}
RestoreInput defines parameters for restoring a project marked for deletion.
type SetCustomHeaderInput ¶
type SetCustomHeaderInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
HookID int64 `json:"hook_id" jsonschema:"Webhook ID,required"`
Key string `json:"key" jsonschema:"Custom header key name,required"`
Value string `json:"value" jsonschema:"Custom header value,required"`
}
SetCustomHeaderInput defines parameters for setting a custom header on a webhook.
type SetWebhookURLVariableInput ¶
type SetWebhookURLVariableInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
HookID int64 `json:"hook_id" jsonschema:"Webhook ID,required"`
Key string `json:"key" jsonschema:"URL variable key name,required"`
Value string `json:"value" jsonschema:"URL variable value,required"`
}
SetWebhookURLVariableInput defines parameters for setting a URL variable on a webhook.
type ShareProjectInput ¶
type ShareProjectInput struct {
}
ShareProjectInput defines parameters for sharing a project with a group.
type ShareProjectOutput ¶
type ShareProjectOutput struct {
}
ShareProjectOutput holds the result of sharing a project.
func ShareProjectWithGroup ¶
func ShareProjectWithGroup(ctx context.Context, client *gitlabclient.Client, input ShareProjectInput) (ShareProjectOutput, error)
ShareProjectWithGroup shares a project with the given group.
type StarInput ¶
type StarInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
StarInput defines parameters for starring a project.
type StarrerOutput ¶
type StarrerOutput struct {
StarredSince string `json:"starred_since"`
User ProjectUserOutput `json:"user"`
}
StarrerOutput represents a user who starred a project.
type StartHousekeepingInput ¶
type StartHousekeepingInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
StartHousekeepingInput defines parameters for triggering project housekeeping.
type StartMirroringInput ¶
type StartMirroringInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
StartMirroringInput defines parameters for triggering a mirror pull.
type TransferInput ¶
type TransferInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Namespace string `json:"namespace" jsonschema:"Target namespace ID or path,required"`
}
TransferInput defines parameters for transferring a project to another namespace.
type TriggerTestHookInput ¶
type TriggerTestHookInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
HookID int64 `json:"hook_id" jsonschema:"Webhook ID to test,required"`
Event string `` /* 216-byte string literal not displayed */
}
TriggerTestHookInput defines parameters for triggering a test webhook event.
type TriggerTestHookOutput ¶
type TriggerTestHookOutput struct {
toolutil.HintableOutput
Message string `json:"message"`
}
TriggerTestHookOutput holds the result of triggering a test webhook.
func TriggerTestHook ¶
func TriggerTestHook(ctx context.Context, client *gitlabclient.Client, input TriggerTestHookInput) (TriggerTestHookOutput, error)
TriggerTestHook triggers a test event for a project webhook.
type UnarchiveInput ¶
type UnarchiveInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
UnarchiveInput defines parameters for unarchiving a project.
type UnstarInput ¶
type UnstarInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
}
UnstarInput defines parameters for unstarring a project.
type UpdateApprovalRuleInput ¶
type UpdateApprovalRuleInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
RuleID int64 `json:"rule_id" jsonschema:"Approval rule ID,required"`
Name string `json:"name,omitempty" jsonschema:"Updated rule name"`
ApprovalsRequired *int64 `json:"approvals_required,omitempty" jsonschema:"Updated number of approvals required"`
UserIDs []int64 `json:"user_ids,omitempty" jsonschema:"Updated user IDs to assign as approvers"`
GroupIDs []int64 `json:"group_ids,omitempty" jsonschema:"Updated group IDs to assign as approvers"`
ProtectedBranchIDs []int64 `json:"protected_branch_ids,omitempty" jsonschema:"Updated protected branch IDs"`
Usernames []string `json:"usernames,omitempty" jsonschema:"Updated usernames to assign as approvers"`
AppliesToAllProtectedBranches *bool `json:"applies_to_all_protected_branches,omitempty" jsonschema:"Apply this rule to all protected branches"`
}
UpdateApprovalRuleInput defines parameters for updating an approval rule.
type UpdateInput ¶
type UpdateInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Name string `json:"name,omitempty" jsonschema:"New project name"`
Description string `json:"description,omitempty" jsonschema:"New description"`
Visibility string `json:"visibility,omitempty" jsonschema:"Visibility level (private, internal, public)"`
DefaultBranch string `json:"default_branch,omitempty" jsonschema:"New default branch"`
MergeMethod string `json:"merge_method,omitempty" jsonschema:"Merge method (merge, rebase_merge, ff)"`
Topics []string `json:"topics,omitempty" jsonschema:"Topic tags for the project"`
SquashOption string `json:"squash_option,omitempty" jsonschema:"Squash option (never, always, default_on, default_off)"`
OnlyAllowMergeIfPipelineSucceeds *bool `json:"only_allow_merge_if_pipeline_succeeds,omitempty" jsonschema:"Only allow merge when pipeline succeeds"`
OnlyAllowMergeIfAllDiscussionsAreResolved *bool `` /* 129-byte string literal not displayed */
IssuesEnabled *bool `` /* 133-byte string literal not displayed */
MergeRequestsEnabled *bool `json:"merge_requests_enabled,omitempty" jsonschema:"Enable merge requests feature"`
WikiEnabled *bool `json:"wiki_enabled,omitempty" jsonschema:"Enable wiki feature"`
JobsEnabled *bool `json:"jobs_enabled,omitempty" jsonschema:"Enable CI/CD jobs"`
LFSEnabled *bool `json:"lfs_enabled,omitempty" jsonschema:"Enable Git LFS"`
RequestAccessEnabled *bool `json:"request_access_enabled,omitempty" jsonschema:"Allow users to request access"`
PublicBuilds *bool `json:"public_builds,omitempty" jsonschema:"Enable public access to pipelines"`
PackagesEnabled *bool `` /* 126-byte string literal not displayed */
PackageRegistryAccessLevel string `json:"package_registry_access_level,omitempty" jsonschema:"Package registry access level (disabled, private, enabled)"`
PagesAccessLevel string `json:"pages_access_level,omitempty" jsonschema:"Pages access level (disabled, private, enabled, public)"`
ContainerRegistryAccessLevel string `json:"container_registry_access_level,omitempty" jsonschema:"Container registry access level (disabled, private, enabled)"`
SnippetsAccessLevel string `json:"snippets_access_level,omitempty" jsonschema:"Snippets access level (disabled, private, enabled)"`
CIConfigPath string `json:"ci_config_path,omitempty" jsonschema:"Custom CI/CD configuration file path"`
AllowMergeOnSkippedPipeline *bool `json:"allow_merge_on_skipped_pipeline,omitempty" jsonschema:"Allow merge when pipeline is skipped"`
RemoveSourceBranchAfterMerge *bool `json:"remove_source_branch_after_merge,omitempty" jsonschema:"Remove source branch after merge by default"`
AutocloseReferencedIssues *bool `json:"autoclose_referenced_issues,omitempty" jsonschema:"Auto-close referenced issues on merge"`
MergeCommitTemplate string `json:"merge_commit_template,omitempty" jsonschema:"Template for merge commit messages"`
SquashCommitTemplate string `json:"squash_commit_template,omitempty" jsonschema:"Template for squash commit messages"`
MergePipelinesEnabled *bool `json:"merge_pipelines_enabled,omitempty" jsonschema:"Enable merged results pipelines"`
MergeTrainsEnabled *bool `json:"merge_trains_enabled,omitempty" jsonschema:"Enable merge trains"`
ResolveOutdatedDiffDiscussions *bool `json:"resolve_outdated_diff_discussions,omitempty" jsonschema:"Auto-resolve outdated diff discussions"`
ApprovalsBeforeMerge int64 `json:"approvals_before_merge,omitempty" jsonschema:"Number of approvals required before merge"`
MergeRequestTitleRegex string `json:"merge_request_title_regex,omitempty" jsonschema:"Regex that MR titles must match"`
MergeRequestTitleRegexDescription string `json:"merge_request_title_regex_description,omitempty" jsonschema:"Human-readable description for the MR title regex"`
}
UpdateInput defines parameters for updating project settings.
type UploadAvatarInput ¶
type UploadAvatarInput struct {
ProjectID toolutil.StringOrInt `json:"project_id" jsonschema:"Project ID or URL-encoded path,required"`
Filename string `json:"filename" jsonschema:"Avatar filename (e.g. avatar.png),required"`
FilePath string `` /* 233-byte string literal not displayed */
ContentBase64 string `` /* 134-byte string literal not displayed */
}
UploadAvatarInput defines parameters for uploading a project avatar. Exactly one of FilePath or ContentBase64 must be provided.