mergerequest

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(reg *registry.Registry, client *gitlab.Client)

Register は MR 関連ツールを登録する

Types

type ChangeInfo

type ChangeInfo struct {
	OldPath     string `json:"old_path"`
	NewPath     string `json:"new_path"`
	Diff        string `json:"diff"`
	NewFile     bool   `json:"new_file"`
	RenamedFile bool   `json:"renamed_file"`
	DeletedFile bool   `json:"deleted_file"`
}

ChangeInfo は変更ファイルの情報

type CreateMergeRequestInput

type CreateMergeRequestInput struct {
	ProjectID    string   `json:"project_id" jsonschema:"description:Project ID or URL-encoded path"`
	SourceBranch string   `json:"source_branch" jsonschema:"description:Source branch name"`
	TargetBranch string   `json:"target_branch" jsonschema:"description:Target branch name"`
	Title        string   `json:"title" jsonschema:"description:Merge request title"`
	Description  *string  `json:"description,omitempty" jsonschema:"description:Merge request description"`
	AssigneeIDs  []int    `json:"assignee_ids,omitempty" jsonschema:"description:Assignee user IDs"`
	ReviewerIDs  []int    `json:"reviewer_ids,omitempty" jsonschema:"description:Reviewer user IDs"`
	Labels       []string `json:"labels,omitempty" jsonschema:"description:Labels to add"`
}

CreateMergeRequestInput は create_merge_request の入力パラメータ

type CreateMergeRequestOutput

type CreateMergeRequestOutput struct {
	IID    int64  `json:"iid"`
	Title  string `json:"title"`
	WebURL string `json:"web_url"`
}

CreateMergeRequestOutput は create_merge_request の出力

type GetMergeRequestChangesInput

type GetMergeRequestChangesInput struct {
	ProjectID       string `json:"project_id" jsonschema:"description:Project ID or URL-encoded path"`
	MergeRequestIID int    `json:"merge_request_iid" jsonschema:"description:Merge Request IID"`
	Page            int    `json:"page,omitempty" jsonschema:"description:Page number (default: 1)"`
	PerPage         int    `json:"per_page,omitempty" jsonschema:"description:Number of items per page (default: 100, max: 100)"`
}

GetMergeRequestChangesInput は get_merge_request_changes の入力パラメータ

type GetMergeRequestChangesOutput

type GetMergeRequestChangesOutput struct {
	Changes []ChangeInfo `json:"changes"`
}

GetMergeRequestChangesOutput は get_merge_request_changes の出力

type GetMergeRequestInput

type GetMergeRequestInput struct {
	ProjectID       string `json:"project_id" jsonschema:"description:Project ID or URL-encoded path"`
	MergeRequestIID int    `json:"merge_request_iid" jsonschema:"description:Merge Request IID"`
}

GetMergeRequestInput は get_merge_request の入力パラメータ

type GetMergeRequestOutput

type GetMergeRequestOutput = MergeRequestDetail

GetMergeRequestOutput は get_merge_request の出力

type ListMergeRequestsInput

type ListMergeRequestsInput struct {
	ProjectID  string  `json:"project_id" jsonschema:"description:Project ID or URL-encoded path"`
	State      *string `json:"state,omitempty" jsonschema:"enum:opened,enum:closed,enum:merged,enum:all,description:MR state filter"`
	AuthorID   *int    `json:"author_id,omitempty" jsonschema:"description:Author user ID filter"`
	AssigneeID *int    `json:"assignee_id,omitempty" jsonschema:"description:Assignee user ID filter"`
	Page       int     `json:"page,omitempty" jsonschema:"description:Page number (default: 1)"`
	PerPage    int     `json:"per_page,omitempty" jsonschema:"description:Number of items per page (default: 100, max: 100)"`
}

ListMergeRequestsInput は list_merge_requests の入力パラメータ

type ListMergeRequestsOutput

type ListMergeRequestsOutput struct {
	MergeRequests []MergeRequestSummary `json:"merge_requests"`
}

ListMergeRequestsOutput は list_merge_requests の出力

type MergeMergeRequestInput

type MergeMergeRequestInput struct {
	ProjectID                string `json:"project_id" jsonschema:"description:Project ID or URL-encoded path"`
	MergeRequestIID          int    `json:"merge_request_iid" jsonschema:"description:Merge Request IID"`
	Squash                   *bool  `json:"squash,omitempty" jsonschema:"description:Squash commits when merging"`
	ShouldRemoveSourceBranch *bool  `json:"should_remove_source_branch,omitempty" jsonschema:"description:Remove source branch after merge"`
}

MergeMergeRequestInput は merge_merge_request の入力パラメータ

type MergeMergeRequestOutput

type MergeMergeRequestOutput struct {
	IID    int64  `json:"iid"`
	State  string `json:"state"`
	WebURL string `json:"web_url"`
}

MergeMergeRequestOutput は merge_merge_request の出力

type MergeRequestDetail

type MergeRequestDetail struct {
	IID          int64  `json:"iid"`
	Title        string `json:"title"`
	Description  string `json:"description"`
	State        string `json:"state"`
	SourceBranch string `json:"source_branch"`
	TargetBranch string `json:"target_branch"`
	WebURL       string `json:"web_url"`
	AuthorName   string `json:"author_name,omitempty"`
}

MergeRequestDetail はMR詳細情報

type MergeRequestSummary

type MergeRequestSummary struct {
	IID          int64  `json:"iid"`
	Title        string `json:"title"`
	State        string `json:"state"`
	SourceBranch string `json:"source_branch"`
	TargetBranch string `json:"target_branch"`
	WebURL       string `json:"web_url"`
	AuthorName   string `json:"author_name,omitempty"`
}

MergeRequestSummary はMR一覧の各項目

type UpdateMergeRequestInput

type UpdateMergeRequestInput struct {
	ProjectID       string   `json:"project_id" jsonschema:"description:Project ID or URL-encoded path"`
	MergeRequestIID int      `json:"merge_request_iid" jsonschema:"description:Merge Request IID"`
	Title           *string  `json:"title,omitempty" jsonschema:"description:New title"`
	Description     *string  `json:"description,omitempty" jsonschema:"description:New description"`
	AssigneeIDs     []int    `json:"assignee_ids,omitempty" jsonschema:"description:New assignee user IDs"`
	ReviewerIDs     []int    `json:"reviewer_ids,omitempty" jsonschema:"description:New reviewer user IDs"`
	Labels          []string `json:"labels,omitempty" jsonschema:"description:New labels"`
	TargetBranch    *string  `json:"target_branch,omitempty" jsonschema:"description:New target branch"`
}

UpdateMergeRequestInput は update_merge_request の入力パラメータ

type UpdateMergeRequestOutput

type UpdateMergeRequestOutput struct {
	IID    int64  `json:"iid"`
	Title  string `json:"title"`
	WebURL string `json:"web_url"`
}

UpdateMergeRequestOutput は update_merge_request の出力

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL