shared

package
v2.49.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AWorkflow = Workflow{
	Name:  "a workflow",
	ID:    123,
	Path:  ".github/workflows/flow.yml",
	State: Active,
}
View Source
var AWorkflowContent = `{"content":"bmFtZTogYSB3b3JrZmxvdwo="}`
View Source
var AnotherDisabledWorkflow = Workflow{
	Name:  "a disabled workflow",
	ID:    1213,
	Path:  ".github/workflows/anotherDisabled.yml",
	State: DisabledManually,
}
View Source
var AnotherWorkflow = Workflow{
	Name:  "another workflow",
	ID:    789,
	Path:  ".github/workflows/another.yml",
	State: Active,
}
View Source
var AnotherWorkflowContent = `{"content":"bmFtZTogYW5vdGhlciB3b3JrZmxvdwo="}`
View Source
var DisabledInactivityWorkflow = Workflow{
	Name:  "a disabled inactivity workflow",
	ID:    1206,
	Path:  ".github/workflows/disabledInactivity.yml",
	State: DisabledInactivity,
}
View Source
var DisabledWorkflow = Workflow{
	Name:  "a disabled workflow",
	ID:    456,
	Path:  ".github/workflows/disabled.yml",
	State: DisabledManually,
}
View Source
var UniqueDisabledWorkflow = Workflow{
	Name:  "terrible workflow",
	ID:    1314,
	Path:  ".github/workflows/terrible.yml",
	State: DisabledManually,
}
View Source
var YetAnotherWorkflow = Workflow{
	Name:  "another workflow",
	ID:    1011,
	Path:  ".github/workflows/yetanother.yml",
	State: Active,
}

Functions

func GetWorkflowContent

func GetWorkflowContent(client *api.Client, repo ghrepo.Interface, workflow Workflow, ref string) ([]byte, error)

Types

type FilteredAllError

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

type Workflow

type Workflow struct {
	Name  string
	ID    int64
	Path  string
	State WorkflowState
}

func FindWorkflow

func FindWorkflow(client *api.Client, repo ghrepo.Interface, workflowSelector string, states []WorkflowState) ([]Workflow, error)

FindWorkflow looks up a workflow either by numeric database ID, file name, or its Name field

func GetWorkflow added in v2.16.0

func GetWorkflow(client *api.Client, repo ghrepo.Interface, workflowID int64) (*Workflow, error)

func GetWorkflows

func GetWorkflows(client *api.Client, repo ghrepo.Interface, limit int) ([]Workflow, error)

func ResolveWorkflow

func ResolveWorkflow(p iprompter, io *iostreams.IOStreams, client *api.Client, repo ghrepo.Interface, prompt bool, workflowSelector string, states []WorkflowState) (*Workflow, error)

func (*Workflow) Base

func (w *Workflow) Base() string

func (*Workflow) Disabled

func (w *Workflow) Disabled() bool

func (*Workflow) ExportData added in v2.34.0

func (w *Workflow) ExportData(fields []string) map[string]interface{}

type WorkflowState

type WorkflowState string
const (
	Active             WorkflowState = "active"
	DisabledManually   WorkflowState = "disabled_manually"
	DisabledInactivity WorkflowState = "disabled_inactivity"
)

type WorkflowsPayload

type WorkflowsPayload struct {
	Workflows []Workflow
}

Jump to

Keyboard shortcuts

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