gh

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CSConclusionActionReq      = "ACTION_REQUIRED"
	CSConclusionCancelled      = "CANCELLED"
	CSConclusionFailure        = "FAILURE"
	CSConclusionNeutral        = "NEUTRAL"
	CSConclusionSkipped        = "SKIPPED"
	CSConclusionStartupFailure = "STARTUP_FAILURE"
	CSConclusionSuccess        = "SUCCESS"
	CSConclusionTimedOut       = "TIMED_OUT"
)

cs = check suite https://docs.github.com/en/graphql/reference/enums#checkconclusionstate

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckSuite

type CheckSuite struct {
	Conclusion string
}

func (CheckSuite) IsAFailure

func (cs CheckSuite) IsAFailure() bool

type NodeResult

type NodeResult struct {
	ID       string
	Workflow WorkflowResult `graphql:"... on Workflow"`
}

type QueryResult

type QueryResult struct {
	NodeResult `graphql:"node(id: $workflowId)"`
}

type Workflow

type Workflow struct {
	ID   string  `yaml:"id"`
	Repo string  `yaml:"repo"`
	Name string  `yaml:"name"`
	Key  *string `yaml:"key"`
	URL  *string `yaml:"url"`
}

type WorkflowDetails

type WorkflowDetails struct {
	TotalCount int
	Workflows  []WorkflowDetailsResult
}

func GetWorkflowDetails

func GetWorkflowDetails(ghClient *ghapi.RESTClient, repo string) (WorkflowDetails, error)

type WorkflowDetailsResult

type WorkflowDetailsResult struct {
	NodeID string `json:"node_id"`
	Name   string
	State  string
}

type WorkflowResult

type WorkflowResult struct {
	Name string
	ID   string
	Runs struct {
		Nodes []WorkflowRunNodesResult
	} `graphql:"runs(first: $numWorkflowRuns)"`
}

type WorkflowRunNodesResult

type WorkflowRunNodesResult struct {
	ID         string
	RunNumber  int
	URL        string
	CreatedAt  githubv4.DateTime
	CheckSuite CheckSuite
}

Jump to

Keyboard shortcuts

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