gitlab

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReactionTargetMergeRequest = "mergeRequest"
	ReactionTargetNote         = "note"
)
View Source
const (
	PipelineStatusSuccess   = "success"
	PipelineStatusFailed    = "failed"
	PipelineStatusCanceled  = "canceled"
	PipelineStatusCancelled = "cancelled"
	PipelineStatusSkipped   = "skipped"
	PipelineStatusManual    = "manual"
	PipelineStatusBlocked   = "blocked"
)
View Source
const (
	AuthTypePersonalAccessToken = "personalAccessToken"
	AuthTypeAppOAuth            = "appOAuth"
	OAuthAccessToken            = "accessToken"
	OAuthRefreshToken           = "refreshToken"
)
View Source
const (
	ResourceTypeMember    = "member"
	ResourceTypeMilestone = "milestone"
	ResourceTypeProject   = "project"
)
View Source
const (
	PipelinePayloadType         = "gitlab.pipeline.finished"
	PipelinePassedOutputChannel = "passed"
	PipelineFailedOutputChannel = "failed"

	RunPipelinePollInterval = 5 * time.Minute
	RunPipelinePollAction   = "poll"
	RunPipelineKVPipelineID = "pipeline_id"
)

Variables

This section is empty.

Functions

Types

type AddReaction added in v0.28.0

type AddReaction struct{}

func (*AddReaction) Cancel added in v0.28.0

func (c *AddReaction) Cancel(ctx core.ExecutionContext) error

func (*AddReaction) Cleanup added in v0.28.0

func (c *AddReaction) Cleanup(ctx core.SetupContext) error

func (*AddReaction) Color added in v0.28.0

func (c *AddReaction) Color() string

func (*AddReaction) Configuration added in v0.28.0

func (c *AddReaction) Configuration() []configuration.Field

func (*AddReaction) Description added in v0.28.0

func (c *AddReaction) Description() string

func (*AddReaction) Documentation added in v0.28.0

func (c *AddReaction) Documentation() string

func (*AddReaction) ExampleOutput added in v0.28.0

func (c *AddReaction) ExampleOutput() map[string]any

func (*AddReaction) Execute added in v0.28.0

func (c *AddReaction) Execute(ctx core.ExecutionContext) error

func (*AddReaction) HandleHook added in v0.28.0

func (c *AddReaction) HandleHook(ctx core.ActionHookContext) error

func (*AddReaction) HandleWebhook added in v0.28.0

func (*AddReaction) Hooks added in v0.28.0

func (c *AddReaction) Hooks() []core.Hook

func (*AddReaction) Icon added in v0.28.0

func (c *AddReaction) Icon() string

func (*AddReaction) Label added in v0.28.0

func (c *AddReaction) Label() string

func (*AddReaction) Name added in v0.28.0

func (c *AddReaction) Name() string

func (*AddReaction) OutputChannels added in v0.28.0

func (c *AddReaction) OutputChannels(configuration any) []core.OutputChannel

func (*AddReaction) ProcessQueueItem added in v0.28.0

func (c *AddReaction) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*AddReaction) Setup added in v0.28.0

func (c *AddReaction) Setup(ctx core.SetupContext) error

type AddReactionConfiguration added in v0.28.0

type AddReactionConfiguration struct {
	Project         string `mapstructure:"project"`
	MergeRequestIID string `mapstructure:"mergeRequestIid"`
	Target          string `mapstructure:"target"`
	NoteID          string `mapstructure:"noteId"`
	Content         string `mapstructure:"content"`
}

type Auth

type Auth struct {
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(client core.HTTPContext) *Auth

func (*Auth) HandleCallback

func (a *Auth) HandleCallback(req *http.Request, config *Configuration, expectedState, redirectURI string) (*TokenResponse, error)

func (*Auth) RefreshToken

func (a *Auth) RefreshToken(baseURL, clientID, clientSecret, refreshToken string) (*TokenResponse, error)

type AwardEmoji added in v0.28.0

type AwardEmoji struct {
	ID          int    `json:"id"`
	Name        string `json:"name"`
	User        User   `json:"user"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
	AwardableID int    `json:"awardable_id,omitempty"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient core.HTTPContext, ctx core.IntegrationContext) (*Client, error)

func (*Client) CancelPipeline

func (c *Client) CancelPipeline(ctx context.Context, projectID string, pipelineID int) error

func (*Client) CreateIssue

func (c *Client) CreateIssue(ctx context.Context, projectID string, req *IssueRequest) (*Issue, error)

func (*Client) CreateMergeRequestAwardEmoji added in v0.28.0

func (c *Client) CreateMergeRequestAwardEmoji(ctx context.Context, projectID, mergeRequestIID string, req *CreateAwardEmojiRequest) (*AwardEmoji, error)

CreateMergeRequestAwardEmoji adds an award emoji to the merge request itself. If the authenticated user has already awarded this emoji, it returns the existing award emoji instead of failing, making the operation idempotent.

func (*Client) CreateMergeRequestNote added in v0.28.0

func (c *Client) CreateMergeRequestNote(ctx context.Context, projectID, mergeRequestIID string, req *CreateNoteRequest) (*Note, error)

func (*Client) CreateMergeRequestNoteAwardEmoji added in v0.28.0

func (c *Client) CreateMergeRequestNoteAwardEmoji(ctx context.Context, projectID, mergeRequestIID, noteID string, req *CreateAwardEmojiRequest) (*AwardEmoji, error)

CreateMergeRequestNoteAwardEmoji adds an award emoji to a note on a merge request. If the authenticated user has already awarded this emoji, it returns the existing award emoji instead of failing, making the operation idempotent.

func (*Client) CreatePipeline

func (c *Client) CreatePipeline(ctx context.Context, projectID string, req *CreatePipelineRequest) (*Pipeline, error)

func (*Client) FetchIntegrationData

func (c *Client) FetchIntegrationData() (*User, []Project, error)

func (*Client) GetLatestPipeline

func (c *Client) GetLatestPipeline(projectID, ref string) (*Pipeline, error)

func (*Client) GetPipeline

func (c *Client) GetPipeline(projectID string, pipelineID int) (*Pipeline, error)

func (*Client) GetPipelineTestReportSummary

func (c *Client) GetPipelineTestReportSummary(projectID string, pipelineID int) (*PipelineTestReportSummary, error)

func (*Client) ListGroupMembers

func (c *Client) ListGroupMembers(groupID string) ([]User, error)

func (*Client) ListMergeRequestAwardEmoji added in v0.28.0

func (c *Client) ListMergeRequestAwardEmoji(projectID, mergeRequestIID string) ([]AwardEmoji, error)

ListMergeRequestAwardEmoji lists the award emoji on a merge request.

func (*Client) ListMergeRequestNoteAwardEmoji added in v0.28.0

func (c *Client) ListMergeRequestNoteAwardEmoji(projectID, mergeRequestIID, noteID string) ([]AwardEmoji, error)

ListMergeRequestNoteAwardEmoji lists the award emoji on a note of a merge request.

func (*Client) ListMilestones

func (c *Client) ListMilestones(projectID string) ([]Milestone, error)

func (*Client) ListPipelines

func (c *Client) ListPipelines(projectID string) ([]Pipeline, error)

func (*Client) ListProjectMembers added in v0.28.0

func (c *Client) ListProjectMembers(projectID string) ([]User, error)

ListProjectMembers lists all members of a project, including inherited ones.

type Configuration

type Configuration struct {
	AuthType     string `mapstructure:"authType" json:"authType"`
	BaseURL      string `mapstructure:"baseUrl" json:"baseUrl"`
	ClientID     string `mapstructure:"clientId" json:"clientId"`
	ClientSecret string `mapstructure:"clientSecret" json:"clientSecret"`
	GroupID      string `mapstructure:"groupId" json:"groupId"`
	AccessToken  string `mapstructure:"accessToken" json:"accessToken"`
}

type CreateAwardEmojiRequest added in v0.28.0

type CreateAwardEmojiRequest struct {
	Name string `json:"name"`
}

type CreateIssue

type CreateIssue struct{}

func (*CreateIssue) Cancel

func (c *CreateIssue) Cancel(ctx core.ExecutionContext) error

func (*CreateIssue) Cleanup

func (c *CreateIssue) Cleanup(ctx core.SetupContext) error

func (*CreateIssue) Color

func (c *CreateIssue) Color() string

func (*CreateIssue) Configuration

func (c *CreateIssue) Configuration() []configuration.Field

func (*CreateIssue) Description

func (c *CreateIssue) Description() string

func (*CreateIssue) Documentation

func (c *CreateIssue) Documentation() string

func (*CreateIssue) ExampleOutput

func (c *CreateIssue) ExampleOutput() map[string]any

func (*CreateIssue) Execute

func (c *CreateIssue) Execute(ctx core.ExecutionContext) error

func (*CreateIssue) HandleHook added in v0.18.0

func (c *CreateIssue) HandleHook(ctx core.ActionHookContext) error

func (*CreateIssue) HandleWebhook

func (*CreateIssue) Hooks added in v0.18.0

func (c *CreateIssue) Hooks() []core.Hook

func (*CreateIssue) Icon

func (c *CreateIssue) Icon() string

func (*CreateIssue) Label

func (c *CreateIssue) Label() string

func (*CreateIssue) Name

func (c *CreateIssue) Name() string

func (*CreateIssue) OutputChannels

func (c *CreateIssue) OutputChannels(configuration any) []core.OutputChannel

func (*CreateIssue) ProcessQueueItem

func (c *CreateIssue) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateIssue) Setup

func (c *CreateIssue) Setup(ctx core.SetupContext) error

type CreateIssueConfiguration

type CreateIssueConfiguration struct {
	Project   string   `mapstructure:"project"`
	Title     string   `mapstructure:"title"`
	Body      string   `mapstructure:"body"`
	Assignees []string `mapstructure:"assignees"`
	Labels    []string `mapstructure:"labels"`
	Milestone string   `mapstructure:"milestone"`
	DueDate   string   `mapstructure:"dueDate"`
}

type CreateMergeComment added in v0.28.0

type CreateMergeComment struct{}

func (*CreateMergeComment) Cancel added in v0.28.0

func (*CreateMergeComment) Cleanup added in v0.28.0

func (c *CreateMergeComment) Cleanup(ctx core.SetupContext) error

func (*CreateMergeComment) Color added in v0.28.0

func (c *CreateMergeComment) Color() string

func (*CreateMergeComment) Configuration added in v0.28.0

func (c *CreateMergeComment) Configuration() []configuration.Field

func (*CreateMergeComment) Description added in v0.28.0

func (c *CreateMergeComment) Description() string

func (*CreateMergeComment) Documentation added in v0.28.0

func (c *CreateMergeComment) Documentation() string

func (*CreateMergeComment) ExampleOutput added in v0.28.0

func (c *CreateMergeComment) ExampleOutput() map[string]any

func (*CreateMergeComment) Execute added in v0.28.0

func (*CreateMergeComment) HandleHook added in v0.28.0

func (c *CreateMergeComment) HandleHook(ctx core.ActionHookContext) error

func (*CreateMergeComment) HandleWebhook added in v0.28.0

func (*CreateMergeComment) Hooks added in v0.28.0

func (c *CreateMergeComment) Hooks() []core.Hook

func (*CreateMergeComment) Icon added in v0.28.0

func (c *CreateMergeComment) Icon() string

func (*CreateMergeComment) Label added in v0.28.0

func (c *CreateMergeComment) Label() string

func (*CreateMergeComment) Name added in v0.28.0

func (c *CreateMergeComment) Name() string

func (*CreateMergeComment) OutputChannels added in v0.28.0

func (c *CreateMergeComment) OutputChannels(configuration any) []core.OutputChannel

func (*CreateMergeComment) ProcessQueueItem added in v0.28.0

func (c *CreateMergeComment) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*CreateMergeComment) Setup added in v0.28.0

func (c *CreateMergeComment) Setup(ctx core.SetupContext) error

type CreateMergeCommentConfiguration added in v0.28.0

type CreateMergeCommentConfiguration struct {
	Project         string `mapstructure:"project"`
	MergeRequestIID string `mapstructure:"mergeRequestIid"`
	Body            string `mapstructure:"body"`
}

type CreateNoteRequest added in v0.28.0

type CreateNoteRequest struct {
	Body string `json:"body"`
}

type CreatePipelineRequest

type CreatePipelineRequest struct {
	Ref    string            `json:"ref"`
	Inputs map[string]string `json:"inputs,omitempty"`
}

type GetLatestPipeline

type GetLatestPipeline struct{}

func (*GetLatestPipeline) Cancel

func (*GetLatestPipeline) Cleanup

func (c *GetLatestPipeline) Cleanup(ctx core.SetupContext) error

func (*GetLatestPipeline) Color

func (c *GetLatestPipeline) Color() string

func (*GetLatestPipeline) Configuration

func (c *GetLatestPipeline) Configuration() []configuration.Field

func (*GetLatestPipeline) Description

func (c *GetLatestPipeline) Description() string

func (*GetLatestPipeline) Documentation

func (c *GetLatestPipeline) Documentation() string

func (*GetLatestPipeline) ExampleOutput

func (c *GetLatestPipeline) ExampleOutput() map[string]any

func (*GetLatestPipeline) Execute

func (c *GetLatestPipeline) Execute(ctx core.ExecutionContext) error

func (*GetLatestPipeline) HandleHook added in v0.18.0

func (c *GetLatestPipeline) HandleHook(ctx core.ActionHookContext) error

func (*GetLatestPipeline) HandleWebhook

func (*GetLatestPipeline) Hooks added in v0.18.0

func (c *GetLatestPipeline) Hooks() []core.Hook

func (*GetLatestPipeline) Icon

func (c *GetLatestPipeline) Icon() string

func (*GetLatestPipeline) Label

func (c *GetLatestPipeline) Label() string

func (*GetLatestPipeline) Name

func (c *GetLatestPipeline) Name() string

func (*GetLatestPipeline) OutputChannels

func (c *GetLatestPipeline) OutputChannels(configuration any) []core.OutputChannel

func (*GetLatestPipeline) ProcessQueueItem

func (c *GetLatestPipeline) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetLatestPipeline) Setup

func (c *GetLatestPipeline) Setup(ctx core.SetupContext) error

type GetLatestPipelineConfiguration

type GetLatestPipelineConfiguration struct {
	Project string `json:"project" mapstructure:"project"`
	Ref     string `json:"ref" mapstructure:"ref"`
}

type GetPipeline

type GetPipeline struct{}

func (*GetPipeline) Cancel

func (c *GetPipeline) Cancel(ctx core.ExecutionContext) error

func (*GetPipeline) Cleanup

func (c *GetPipeline) Cleanup(ctx core.SetupContext) error

func (*GetPipeline) Color

func (c *GetPipeline) Color() string

func (*GetPipeline) Configuration

func (c *GetPipeline) Configuration() []configuration.Field

func (*GetPipeline) Description

func (c *GetPipeline) Description() string

func (*GetPipeline) Documentation

func (c *GetPipeline) Documentation() string

func (*GetPipeline) ExampleOutput

func (c *GetPipeline) ExampleOutput() map[string]any

func (*GetPipeline) Execute

func (c *GetPipeline) Execute(ctx core.ExecutionContext) error

func (*GetPipeline) HandleHook added in v0.18.0

func (c *GetPipeline) HandleHook(ctx core.ActionHookContext) error

func (*GetPipeline) HandleWebhook

func (*GetPipeline) Hooks added in v0.18.0

func (c *GetPipeline) Hooks() []core.Hook

func (*GetPipeline) Icon

func (c *GetPipeline) Icon() string

func (*GetPipeline) Label

func (c *GetPipeline) Label() string

func (*GetPipeline) Name

func (c *GetPipeline) Name() string

func (*GetPipeline) OutputChannels

func (c *GetPipeline) OutputChannels(configuration any) []core.OutputChannel

func (*GetPipeline) ProcessQueueItem

func (c *GetPipeline) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetPipeline) Setup

func (c *GetPipeline) Setup(ctx core.SetupContext) error

type GetPipelineConfiguration

type GetPipelineConfiguration struct {
	Project  string `json:"project" mapstructure:"project"`
	Pipeline string `json:"pipeline" mapstructure:"pipeline"`
}

type GetTestReportSummary

type GetTestReportSummary struct{}

func (*GetTestReportSummary) Cancel

func (*GetTestReportSummary) Cleanup

func (c *GetTestReportSummary) Cleanup(ctx core.SetupContext) error

func (*GetTestReportSummary) Color

func (c *GetTestReportSummary) Color() string

func (*GetTestReportSummary) Configuration

func (c *GetTestReportSummary) Configuration() []configuration.Field

func (*GetTestReportSummary) Description

func (c *GetTestReportSummary) Description() string

func (*GetTestReportSummary) Documentation

func (c *GetTestReportSummary) Documentation() string

func (*GetTestReportSummary) ExampleOutput

func (c *GetTestReportSummary) ExampleOutput() map[string]any

func (*GetTestReportSummary) Execute

func (*GetTestReportSummary) HandleHook added in v0.18.0

func (c *GetTestReportSummary) HandleHook(ctx core.ActionHookContext) error

func (*GetTestReportSummary) HandleWebhook

func (*GetTestReportSummary) Hooks added in v0.18.0

func (c *GetTestReportSummary) Hooks() []core.Hook

func (*GetTestReportSummary) Icon

func (c *GetTestReportSummary) Icon() string

func (*GetTestReportSummary) Label

func (c *GetTestReportSummary) Label() string

func (*GetTestReportSummary) Name

func (c *GetTestReportSummary) Name() string

func (*GetTestReportSummary) OutputChannels

func (c *GetTestReportSummary) OutputChannels(configuration any) []core.OutputChannel

func (*GetTestReportSummary) ProcessQueueItem

func (c *GetTestReportSummary) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*GetTestReportSummary) Setup

type GetTestReportSummaryConfiguration

type GetTestReportSummaryConfiguration struct {
	Project  string `json:"project" mapstructure:"project"`
	Pipeline string `json:"pipeline" mapstructure:"pipeline"`
}

type GitLab

type GitLab struct {
}

func (*GitLab) Actions

func (g *GitLab) Actions() []core.Action

func (*GitLab) Cleanup

func (g *GitLab) Cleanup(ctx core.IntegrationCleanupContext) error

func (*GitLab) Configuration

func (g *GitLab) Configuration() []configuration.Field

func (*GitLab) Description

func (g *GitLab) Description() string

func (*GitLab) HandleHook added in v0.18.0

func (g *GitLab) HandleHook(ctx core.IntegrationHookContext) error

func (*GitLab) HandleRequest

func (g *GitLab) HandleRequest(ctx core.HTTPRequestContext)

func (*GitLab) Hooks added in v0.18.0

func (g *GitLab) Hooks() []core.Hook

func (*GitLab) Icon

func (g *GitLab) Icon() string

func (*GitLab) Instructions

func (g *GitLab) Instructions() string

func (*GitLab) Label

func (g *GitLab) Label() string

func (*GitLab) ListResources

func (g *GitLab) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*GitLab) Name

func (g *GitLab) Name() string

func (*GitLab) Sync

func (g *GitLab) Sync(ctx core.SyncContext) error

func (*GitLab) Triggers

func (g *GitLab) Triggers() []core.Trigger

type GitLabWebhookHandler

type GitLabWebhookHandler struct{}

func (*GitLabWebhookHandler) Cleanup

func (*GitLabWebhookHandler) CompareConfig

func (h *GitLabWebhookHandler) CompareConfig(a, b any) (bool, error)

func (*GitLabWebhookHandler) Merge

func (h *GitLabWebhookHandler) Merge(current, requested any) (any, bool, error)

func (*GitLabWebhookHandler) Setup

type Hook

type Hook struct {
	ID                       int    `json:"id"`
	URL                      string `json:"url"`
	ProjectID                int    `json:"project_id"`
	IssuesEvents             bool   `json:"issues_events"`
	MergeRequestsEvents      bool   `json:"merge_requests_events"`
	PushEvents               bool   `json:"push_events"`
	TagPushEvents            bool   `json:"tag_push_events"`
	NoteEvents               bool   `json:"note_events"`
	ConfidentialIssuesEvents bool   `json:"confidential_issues_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"`
	VulnerabilityEvents      bool   `json:"vulnerability_events"`
}

type HookEvents

type HookEvents struct {
	IssuesEvents             bool
	MergeRequestsEvents      bool
	PushEvents               bool
	TagPushEvents            bool
	NoteEvents               bool
	ConfidentialIssuesEvents bool
	PipelineEvents           bool
	WikiPageEvents           bool
	DeploymentEvents         bool
	ReleasesEvents           bool
	MilestoneEvents          bool
	VulnerabilityEvents      bool
}

type HooksClient

type HooksClient struct {
	*Client
}

func NewHooksClient

func NewHooksClient(httpClient core.HTTPContext, ctx core.IntegrationContext) (*HooksClient, error)

func (*HooksClient) CreateHook

func (c *HooksClient) CreateHook(projectID string, webhookURL string, secret string, events HookEvents) (*Hook, error)

func (*HooksClient) DeleteHook

func (c *HooksClient) DeleteHook(projectID string, hookID int) error

type Issue

type Issue struct {
	ID          int        `json:"id"`
	IID         int        `json:"iid"`
	ProjectID   int        `json:"project_id"`
	Title       string     `json:"title"`
	Description string     `json:"description"`
	State       string     `json:"state"`
	CreatedAt   string     `json:"created_at"`
	UpdatedAt   string     `json:"updated_at"`
	ClosedAt    *string    `json:"closed_at"`
	ClosedBy    *User      `json:"closed_by"`
	Labels      []string   `json:"labels"`
	Milestone   *Milestone `json:"milestone"`
	DueDate     *string    `json:"due_date"`
	WebURL      string     `json:"web_url"`
	Author      User       `json:"author"`
	Assignees   []User     `json:"assignees"`
}

type IssueRequest

type IssueRequest struct {
	Title       string `json:"title"`
	Description string `json:"description,omitempty"`
	Labels      string `json:"labels,omitempty"`
	AssigneeIDs []int  `json:"assignee_ids,omitempty"`
	MilestoneID *int   `json:"milestone_id,omitempty"`
	DueDate     string `json:"due_date,omitempty"`
}

type Metadata

type Metadata struct {
	State    *string           `mapstructure:"state,omitempty" json:"state,omitempty"`
	Projects []ProjectMetadata `mapstructure:"projects" json:"projects"`
	User     *UserMetadata     `mapstructure:"user,omitempty" json:"user,omitempty"`
}

type Milestone

type Milestone struct {
	ID    int    `json:"id"`
	IID   int    `json:"iid"`
	Title string `json:"title"`
	State string `json:"state"`
}

type NodeMetadata

type NodeMetadata struct {
	Project *ProjectMetadata `json:"project"`
}

type Note added in v0.28.0

type Note struct {
	ID           int    `json:"id"`
	Body         string `json:"body"`
	Author       User   `json:"author"`
	CreatedAt    string `json:"created_at"`
	UpdatedAt    string `json:"updated_at"`
	System       bool   `json:"system"`
	NoteableID   int    `json:"noteable_id,omitempty"`
	NoteableIID  int    `json:"noteable_iid,omitempty"`
	NoteableType string `json:"noteable_type,omitempty"`
}

type OnIssue

type OnIssue struct{}

func (*OnIssue) Cleanup

func (i *OnIssue) Cleanup(ctx core.TriggerContext) error

func (*OnIssue) Color

func (i *OnIssue) Color() string

func (*OnIssue) Configuration

func (i *OnIssue) Configuration() []configuration.Field

func (*OnIssue) Description

func (i *OnIssue) Description() string

func (*OnIssue) Documentation

func (i *OnIssue) Documentation() string

func (*OnIssue) ExampleData

func (i *OnIssue) ExampleData() map[string]any

func (*OnIssue) HandleHook added in v0.18.0

func (i *OnIssue) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnIssue) HandleWebhook

func (i *OnIssue) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)

func (*OnIssue) Hooks added in v0.18.0

func (i *OnIssue) Hooks() []core.Hook

func (*OnIssue) Icon

func (i *OnIssue) Icon() string

func (*OnIssue) Label

func (i *OnIssue) Label() string

func (*OnIssue) Name

func (i *OnIssue) Name() string

func (*OnIssue) Setup

func (i *OnIssue) Setup(ctx core.TriggerContext) error

type OnIssueConfiguration

type OnIssueConfiguration struct {
	Project string                    `json:"project" mapstructure:"project"`
	Actions []string                  `json:"actions" mapstructure:"actions"`
	Labels  []configuration.Predicate `json:"labels" mapstructure:"labels"`
}

type OnMergeComment added in v0.28.0

type OnMergeComment struct{}

func (*OnMergeComment) Cleanup added in v0.28.0

func (m *OnMergeComment) Cleanup(ctx core.TriggerContext) error

func (*OnMergeComment) Color added in v0.28.0

func (m *OnMergeComment) Color() string

func (*OnMergeComment) Configuration added in v0.28.0

func (m *OnMergeComment) Configuration() []configuration.Field

func (*OnMergeComment) Description added in v0.28.0

func (m *OnMergeComment) Description() string

func (*OnMergeComment) Documentation added in v0.28.0

func (m *OnMergeComment) Documentation() string

func (*OnMergeComment) ExampleData added in v0.28.0

func (m *OnMergeComment) ExampleData() map[string]any

func (*OnMergeComment) HandleHook added in v0.28.0

func (m *OnMergeComment) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnMergeComment) HandleWebhook added in v0.28.0

func (*OnMergeComment) Hooks added in v0.28.0

func (m *OnMergeComment) Hooks() []core.Hook

func (*OnMergeComment) Icon added in v0.28.0

func (m *OnMergeComment) Icon() string

func (*OnMergeComment) Label added in v0.28.0

func (m *OnMergeComment) Label() string

func (*OnMergeComment) Name added in v0.28.0

func (m *OnMergeComment) Name() string

func (*OnMergeComment) Setup added in v0.28.0

func (m *OnMergeComment) Setup(ctx core.TriggerContext) error

type OnMergeCommentConfiguration added in v0.28.0

type OnMergeCommentConfiguration struct {
	Project       string `json:"project" mapstructure:"project"`
	ContentFilter string `json:"contentFilter" mapstructure:"contentFilter"`
}

type OnMergeRequest

type OnMergeRequest struct{}

func (*OnMergeRequest) Cleanup

func (m *OnMergeRequest) Cleanup(ctx core.TriggerContext) error

func (*OnMergeRequest) Color

func (m *OnMergeRequest) Color() string

func (*OnMergeRequest) Configuration

func (m *OnMergeRequest) Configuration() []configuration.Field

func (*OnMergeRequest) Description

func (m *OnMergeRequest) Description() string

func (*OnMergeRequest) Documentation

func (m *OnMergeRequest) Documentation() string

func (*OnMergeRequest) ExampleData

func (m *OnMergeRequest) ExampleData() map[string]any

func (*OnMergeRequest) HandleHook added in v0.18.0

func (m *OnMergeRequest) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnMergeRequest) HandleWebhook

func (*OnMergeRequest) Hooks added in v0.18.0

func (m *OnMergeRequest) Hooks() []core.Hook

func (*OnMergeRequest) Icon

func (m *OnMergeRequest) Icon() string

func (*OnMergeRequest) Label

func (m *OnMergeRequest) Label() string

func (*OnMergeRequest) Name

func (m *OnMergeRequest) Name() string

func (*OnMergeRequest) Setup

func (m *OnMergeRequest) Setup(ctx core.TriggerContext) error

type OnMergeRequestConfiguration

type OnMergeRequestConfiguration struct {
	Project string   `json:"project" mapstructure:"project"`
	Actions []string `json:"actions" mapstructure:"actions"`
}

type OnMilestone

type OnMilestone struct{}

func (*OnMilestone) Cleanup

func (m *OnMilestone) Cleanup(ctx core.TriggerContext) error

func (*OnMilestone) Color

func (m *OnMilestone) Color() string

func (*OnMilestone) Configuration

func (m *OnMilestone) Configuration() []configuration.Field

func (*OnMilestone) Description

func (m *OnMilestone) Description() string

func (*OnMilestone) Documentation

func (m *OnMilestone) Documentation() string

func (*OnMilestone) ExampleData

func (m *OnMilestone) ExampleData() map[string]any

func (*OnMilestone) HandleHook added in v0.18.0

func (m *OnMilestone) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnMilestone) HandleWebhook

func (*OnMilestone) Hooks added in v0.18.0

func (m *OnMilestone) Hooks() []core.Hook

func (*OnMilestone) Icon

func (m *OnMilestone) Icon() string

func (*OnMilestone) Label

func (m *OnMilestone) Label() string

func (*OnMilestone) Name

func (m *OnMilestone) Name() string

func (*OnMilestone) Setup

func (m *OnMilestone) Setup(ctx core.TriggerContext) error

type OnMilestoneConfiguration

type OnMilestoneConfiguration struct {
	Project string   `json:"project" mapstructure:"project"`
	Actions []string `json:"actions" mapstructure:"actions"`
}

type OnPipeline

type OnPipeline struct{}

func (*OnPipeline) Cleanup

func (p *OnPipeline) Cleanup(ctx core.TriggerContext) error

func (*OnPipeline) Color

func (p *OnPipeline) Color() string

func (*OnPipeline) Configuration

func (p *OnPipeline) Configuration() []configuration.Field

func (*OnPipeline) Description

func (p *OnPipeline) Description() string

func (*OnPipeline) Documentation

func (p *OnPipeline) Documentation() string

func (*OnPipeline) ExampleData

func (p *OnPipeline) ExampleData() map[string]any

func (*OnPipeline) HandleHook added in v0.18.0

func (p *OnPipeline) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnPipeline) HandleWebhook

func (*OnPipeline) Hooks added in v0.18.0

func (p *OnPipeline) Hooks() []core.Hook

func (*OnPipeline) Icon

func (p *OnPipeline) Icon() string

func (*OnPipeline) Label

func (p *OnPipeline) Label() string

func (*OnPipeline) Name

func (p *OnPipeline) Name() string

func (*OnPipeline) Setup

func (p *OnPipeline) Setup(ctx core.TriggerContext) error

type OnPipelineConfiguration

type OnPipelineConfiguration struct {
	Project  string   `json:"project" mapstructure:"project"`
	Statuses []string `json:"statuses" mapstructure:"statuses"`
}

type OnRelease

type OnRelease struct{}

func (*OnRelease) Cleanup

func (r *OnRelease) Cleanup(ctx core.TriggerContext) error

func (*OnRelease) Color

func (r *OnRelease) Color() string

func (*OnRelease) Configuration

func (r *OnRelease) Configuration() []configuration.Field

func (*OnRelease) Description

func (r *OnRelease) Description() string

func (*OnRelease) Documentation

func (r *OnRelease) Documentation() string

func (*OnRelease) ExampleData

func (r *OnRelease) ExampleData() map[string]any

func (*OnRelease) HandleHook added in v0.18.0

func (r *OnRelease) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnRelease) HandleWebhook

func (*OnRelease) Hooks added in v0.18.0

func (r *OnRelease) Hooks() []core.Hook

func (*OnRelease) Icon

func (r *OnRelease) Icon() string

func (*OnRelease) Label

func (r *OnRelease) Label() string

func (*OnRelease) Name

func (r *OnRelease) Name() string

func (*OnRelease) Setup

func (r *OnRelease) Setup(ctx core.TriggerContext) error

type OnReleaseConfiguration

type OnReleaseConfiguration struct {
	Project string   `json:"project" mapstructure:"project"`
	Actions []string `json:"actions" mapstructure:"actions"`
}

type OnTag

type OnTag struct{}

func (*OnTag) Cleanup

func (t *OnTag) Cleanup(ctx core.TriggerContext) error

func (*OnTag) Color

func (t *OnTag) Color() string

func (*OnTag) Configuration

func (t *OnTag) Configuration() []configuration.Field

func (*OnTag) Description

func (t *OnTag) Description() string

func (*OnTag) Documentation

func (t *OnTag) Documentation() string

func (*OnTag) ExampleData

func (t *OnTag) ExampleData() map[string]any

func (*OnTag) HandleHook added in v0.18.0

func (t *OnTag) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnTag) HandleWebhook

func (t *OnTag) HandleWebhook(ctx core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)

func (*OnTag) Hooks added in v0.18.0

func (t *OnTag) Hooks() []core.Hook

func (*OnTag) Icon

func (t *OnTag) Icon() string

func (*OnTag) Label

func (t *OnTag) Label() string

func (*OnTag) Name

func (t *OnTag) Name() string

func (*OnTag) Setup

func (t *OnTag) Setup(ctx core.TriggerContext) error

type OnTagConfiguration

type OnTagConfiguration struct {
	Project string                    `json:"project" mapstructure:"project"`
	Tags    []configuration.Predicate `json:"tags" mapstructure:"tags"`
}

type OnVulnerability

type OnVulnerability struct{}

func (*OnVulnerability) Cleanup

func (v *OnVulnerability) Cleanup(ctx core.TriggerContext) error

func (*OnVulnerability) Color

func (v *OnVulnerability) Color() string

func (*OnVulnerability) Configuration

func (v *OnVulnerability) Configuration() []configuration.Field

func (*OnVulnerability) Description

func (v *OnVulnerability) Description() string

func (*OnVulnerability) Documentation

func (v *OnVulnerability) Documentation() string

func (*OnVulnerability) ExampleData

func (v *OnVulnerability) ExampleData() map[string]any

func (*OnVulnerability) HandleHook added in v0.18.0

func (v *OnVulnerability) HandleHook(ctx core.TriggerHookContext) (map[string]any, error)

func (*OnVulnerability) HandleWebhook

func (*OnVulnerability) Hooks added in v0.18.0

func (v *OnVulnerability) Hooks() []core.Hook

func (*OnVulnerability) Icon

func (v *OnVulnerability) Icon() string

func (*OnVulnerability) Label

func (v *OnVulnerability) Label() string

func (*OnVulnerability) Name

func (v *OnVulnerability) Name() string

func (*OnVulnerability) Setup

func (v *OnVulnerability) Setup(ctx core.TriggerContext) error

type OnVulnerabilityConfiguration

type OnVulnerabilityConfiguration struct {
	Project string `json:"project" mapstructure:"project"`
}

type Pipeline

type Pipeline struct {
	ID             int            `json:"id"`
	IID            int            `json:"iid"`
	ProjectID      int            `json:"project_id"`
	Status         string         `json:"status"`
	Source         string         `json:"source,omitempty"`
	Ref            string         `json:"ref"`
	SHA            string         `json:"sha"`
	BeforeSHA      string         `json:"before_sha,omitempty"`
	Tag            bool           `json:"tag,omitempty"`
	YamlErrors     *string        `json:"yaml_errors,omitempty"`
	WebURL         string         `json:"web_url"`
	URL            string         `json:"url,omitempty"`
	CreatedAt      string         `json:"created_at"`
	UpdatedAt      string         `json:"updated_at"`
	StartedAt      string         `json:"started_at,omitempty"`
	FinishedAt     string         `json:"finished_at,omitempty"`
	CommittedAt    string         `json:"committed_at,omitempty"`
	Duration       float64        `json:"duration,omitempty"`
	QueuedDuration float64        `json:"queued_duration,omitempty"`
	Coverage       string         `json:"coverage,omitempty"`
	User           map[string]any `json:"user,omitempty"`
	DetailedStatus map[string]any `json:"detailed_status,omitempty"`
}

type PipelineInput

type PipelineInput struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type PipelineMetadata

type PipelineMetadata struct {
	ID     int    `json:"id"`
	IID    int    `json:"iid"`
	Status string `json:"status"`
	URL    string `json:"url,omitempty"`
}

type PipelineTestReportSummary

type PipelineTestReportSummary struct {
	Total      map[string]any   `json:"total"`
	TestSuites []map[string]any `json:"test_suites"`
}

type PipelineVariable

type PipelineVariable struct {
	Key          string `json:"key"`
	Value        string `json:"value"`
	VariableType string `json:"variable_type,omitempty"`
}

type Project

type Project struct {
	ID                int    `json:"id"`
	PathWithNamespace string `json:"path_with_namespace"`
	WebURL            string `json:"web_url"`
}

type ProjectMetadata

type ProjectMetadata struct {
	ID   int    `mapstructure:"id" json:"id"`
	Name string `mapstructure:"name" json:"name"`
	URL  string `mapstructure:"url" json:"url"`
}

type RunPipeline

type RunPipeline struct{}

func (*RunPipeline) Cancel

func (r *RunPipeline) Cancel(ctx core.ExecutionContext) error

func (*RunPipeline) Cleanup

func (r *RunPipeline) Cleanup(ctx core.SetupContext) error

func (*RunPipeline) Color

func (r *RunPipeline) Color() string

func (*RunPipeline) Configuration

func (r *RunPipeline) Configuration() []configuration.Field

func (*RunPipeline) Description

func (r *RunPipeline) Description() string

func (*RunPipeline) Documentation

func (r *RunPipeline) Documentation() string

func (*RunPipeline) ExampleOutput

func (r *RunPipeline) ExampleOutput() map[string]any

func (*RunPipeline) Execute

func (r *RunPipeline) Execute(ctx core.ExecutionContext) error

func (*RunPipeline) HandleHook added in v0.18.0

func (r *RunPipeline) HandleHook(ctx core.ActionHookContext) error

func (*RunPipeline) HandleWebhook

func (*RunPipeline) Hooks added in v0.18.0

func (r *RunPipeline) Hooks() []core.Hook

func (*RunPipeline) Icon

func (r *RunPipeline) Icon() string

func (*RunPipeline) Label

func (r *RunPipeline) Label() string

func (*RunPipeline) Name

func (r *RunPipeline) Name() string

func (*RunPipeline) OutputChannels

func (r *RunPipeline) OutputChannels(configuration any) []core.OutputChannel

func (*RunPipeline) ProcessQueueItem

func (r *RunPipeline) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*RunPipeline) Setup

func (r *RunPipeline) Setup(ctx core.SetupContext) error

type RunPipelineExecutionMetadata

type RunPipelineExecutionMetadata struct {
	Pipeline *PipelineMetadata `json:"pipeline" mapstructure:"pipeline"`
}

type RunPipelineInputSpec

type RunPipelineInputSpec struct {
	Name  string `json:"name" mapstructure:"name"`
	Value string `json:"value" mapstructure:"value"`
}

type RunPipelineSpec

type RunPipelineSpec struct {
	Project string                 `json:"project" mapstructure:"project"`
	Ref     string                 `json:"ref" mapstructure:"ref"`
	Inputs  []RunPipelineInputSpec `json:"inputs" mapstructure:"inputs"`
}

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
	Scope        string `json:"scope"`
}

func (*TokenResponse) GetExpiration

func (t *TokenResponse) GetExpiration() time.Duration

type User

type User struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Username  string `json:"username"`
	State     string `json:"state"`
	AvatarURL string `json:"avatar_url"`
	WebURL    string `json:"web_url"`
}

type UserMetadata

type UserMetadata struct {
	ID       int    `mapstructure:"id" json:"id"`
	Name     string `mapstructure:"name" json:"name"`
	Username string `mapstructure:"username" json:"username"`
}

type WebhookConfiguration

type WebhookConfiguration struct {
	EventType string `json:"eventType" mapstructure:"eventType"`
	ProjectID string `json:"projectId" mapstructure:"projectId"`
}

type WebhookMetadata

type WebhookMetadata struct {
	ID int `json:"id" mapstructure:"id"`
}

Jump to

Keyboard shortcuts

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