Documentation
¶
Index ¶
- Variables
- func GetWorkflowContent(client *api.Client, repo ghrepo.Interface, workflow Workflow, ref string) ([]byte, error)
- type FilteredAllError
- type Workflow
- func FindWorkflow(client *api.Client, repo ghrepo.Interface, workflowSelector string, ...) ([]Workflow, error)
- func GetWorkflow(client *api.Client, repo ghrepo.Interface, workflowID int64) (*Workflow, error)
- func GetWorkflows(client *api.Client, repo ghrepo.Interface, limit int) ([]Workflow, error)
- func ResolveWorkflow(io *iostreams.IOStreams, client *api.Client, repo ghrepo.Interface, ...) (*Workflow, error)
- func SelectWorkflow(workflows []Workflow, promptMsg string, states []WorkflowState) (*Workflow, error)
- type WorkflowState
- type WorkflowsPayload
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 ¶
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 ¶
func GetWorkflows ¶
func ResolveWorkflow ¶
func SelectWorkflow ¶
func SelectWorkflow(workflows []Workflow, promptMsg string, states []WorkflowState) (*Workflow, error)
type WorkflowState ¶
type WorkflowState string
const ( Active WorkflowState = "active" DisabledManually WorkflowState = "disabled_manually" DisabledInactivity WorkflowState = "disabled_inactivity" )
type WorkflowsPayload ¶
type WorkflowsPayload struct {
Workflows []Workflow
}
Click to show internal directories.
Click to hide internal directories.