shared

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 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    int
	Path  string
	State WorkflowState
}

func FindWorkflow

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

func GetWorkflows

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

func ResolveWorkflow

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

func SelectWorkflow

func SelectWorkflow(workflows []Workflow, promptMsg string, states []WorkflowState) (*Workflow, error)

func (*Workflow) Base

func (w *Workflow) Base() string

func (*Workflow) Disabled

func (w *Workflow) Disabled() bool

type WorkflowState

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

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