actions

package
v0.0.0-...-e61ee7f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Approve

func Approve(ctx *context_module.Context)

func ArtifactsDeleteView

func ArtifactsDeleteView(ctx *context_module.Context)

func ArtifactsDownloadView

func ArtifactsDownloadView(ctx *context_module.Context)

func Cancel

func Cancel(ctx *context_module.Context)

func DisableWorkflowFile

func DisableWorkflowFile(ctx *context_module.Context)

func EnableWorkflowFile

func EnableWorkflowFile(ctx *context_module.Context)

func GetWorkflowBadge

func GetWorkflowBadge(ctx *context.Context)

func List

func List(ctx *context.Context)

func Logs

func Logs(ctx *context_module.Context)

func MustEnableActions

func MustEnableActions(ctx *context.Context)

MustEnableActions check if actions are enabled in settings

func Rerun

func Rerun(ctx *context_module.Context)

Rerun will rerun jobs in the given run If jobIndexStr is a blank string, it means rerun all jobs

func Run

func Run(ctx *context_module.Context)

func View

func View(ctx *context_module.Context)

func ViewPost

func ViewPost(ctx *context_module.Context)

Types

type ArtifactsViewItem

type ArtifactsViewItem struct {
	Name   string `json:"name"`
	Size   int64  `json:"size"`
	Status string `json:"status"`
}

type LogCursor

type LogCursor struct {
	Step     int   `json:"step"`
	Cursor   int64 `json:"cursor"`
	Expanded bool  `json:"expanded"`
}

type ViewBranch

type ViewBranch struct {
	Name      string `json:"name"`
	Link      string `json:"link"`
	IsDeleted bool   `json:"isDeleted"`
}

type ViewCommit

type ViewCommit struct {
	ShortSha string     `json:"shortSHA"`
	Link     string     `json:"link"`
	Pusher   ViewUser   `json:"pusher"`
	Branch   ViewBranch `json:"branch"`
}

type ViewJob

type ViewJob struct {
	ID       int64  `json:"id"`
	Name     string `json:"name"`
	Status   string `json:"status"`
	CanRerun bool   `json:"canRerun"`
	Duration string `json:"duration"`
}

type ViewJobStep

type ViewJobStep struct {
	Summary  string `json:"summary"`
	Duration string `json:"duration"`
	Status   string `json:"status"`
}

type ViewRequest

type ViewRequest struct {
	LogCursors []LogCursor `json:"logCursors"`
}

type ViewResponse

type ViewResponse struct {
	Artifacts []*ArtifactsViewItem `json:"artifacts"`

	State struct {
		Run struct {
			Link              string        `json:"link"`
			Title             string        `json:"title"`
			TitleHTML         template.HTML `json:"titleHTML"`
			Status            string        `json:"status"`
			CanCancel         bool          `json:"canCancel"`
			CanApprove        bool          `json:"canApprove"` // the run needs an approval and the doer has permission to approve
			CanRerun          bool          `json:"canRerun"`
			CanDeleteArtifact bool          `json:"canDeleteArtifact"`
			Done              bool          `json:"done"`
			WorkflowID        string        `json:"workflowID"`
			WorkflowLink      string        `json:"workflowLink"`
			IsSchedule        bool          `json:"isSchedule"`
			Jobs              []*ViewJob    `json:"jobs"`
			Commit            ViewCommit    `json:"commit"`
		} `json:"run"`
		CurrentJob struct {
			Title  string         `json:"title"`
			Detail string         `json:"detail"`
			Steps  []*ViewJobStep `json:"steps"`
		} `json:"currentJob"`
	} `json:"state"`
	Logs struct {
		StepsLog []*ViewStepLog `json:"stepsLog"`
	} `json:"logs"`
}

type ViewStepLog

type ViewStepLog struct {
	Step    int                `json:"step"`
	Cursor  int64              `json:"cursor"`
	Lines   []*ViewStepLogLine `json:"lines"`
	Started int64              `json:"started"`
}

type ViewStepLogLine

type ViewStepLogLine struct {
	Index     int64   `json:"index"`
	Message   string  `json:"message"`
	Timestamp float64 `json:"timestamp"`
}

type ViewUser

type ViewUser struct {
	DisplayName string `json:"displayName"`
	Link        string `json:"link"`
}

type Workflow

type Workflow struct {
	Entry  git.TreeEntry
	ErrMsg string
}

type WorkflowDispatch

type WorkflowDispatch struct {
	Inputs []WorkflowDispatchInput
}

type WorkflowDispatchInput

type WorkflowDispatchInput struct {
	Name        string   `yaml:"name"`
	Description string   `yaml:"description"`
	Required    bool     `yaml:"required"`
	Default     string   `yaml:"default"`
	Type        string   `yaml:"type"`
	Options     []string `yaml:"options"`
}

Jump to

Keyboard shortcuts

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