cmd

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagAPIToken       = "api-token"
	FlagConfigFile     = "config"
	FlagDryRun         = "dry-run"
	FlagMergeRequestID = "id"
	FlagUpdatePipeline = "update-pipeline"
	FlagCommitSHA      = "commit"
	FlagSCMBaseURL     = "base-url"
	FlagSCMProject     = "project"
	FlagServerListen   = "listen"
	FlagWebhookSecret  = "webhook-secret"
)

Variables

View Source
var GlobalOptionsTemplate = `` /* 133-byte string literal not displayed */

Functions

func Evaluate

func Evaluate(cCtx *cli.Context) error

func ProcessMR

func ProcessMR(ctx context.Context, client scm.Client, cfg *config.Config, event any) (err error)

func Server

func Server(cCtx *cli.Context) error

Types

type Commit added in v0.4.0

type Commit struct {
	ID string `json:"id"`
}

type MergeRequest added in v0.4.0

type MergeRequest struct {
	IID        int    `json:"iid"`
	LastCommit Commit `json:"last_commit"`
}

type Payload added in v0.4.0

type Payload struct {
	EventType        string        `json:"event_type"`
	Project          Project       `json:"project"`                     // "project" is sent for all events
	ObjectAttributes *MergeRequest `json:"object_attributes,omitempty"` // "object_attributes" is sent on "merge_request" events
	MergeRequest     *MergeRequest `json:"merge_request,omitempty"`     // "merge_request" is sent on "note" activity
}

type Project added in v0.4.0

type Project struct {
	PathWithNamespace string `json:"path_with_namespace"`
}

Jump to

Keyboard shortcuts

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