gh

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 5 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"

	CSStateRequested  = "REQUESTED"
	CSStateQueued     = "QUEUED"
	CSStateInProgress = "IN_PROGRESS"
	CSStateCompleted  = "COMPLETED"
	CSStateWaiting    = "WAITING"
	CSStatePending    = "PENDING"
)

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 {
	Status     string
	Conclusion string
}

func (CheckSuite) ConclusionOrState added in v1.1.0

func (cs CheckSuite) ConclusionOrState() string

func (CheckSuite) FinishedSuccessfully added in v1.1.0

func (cs CheckSuite) FinishedSuccessfully() bool

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 ResultData added in v1.1.0

type ResultData struct {
	Workflow types.Workflow
	Result   QueryResult
	Err      error
}

func GetWorkflowRuns added in v1.1.0

func GetWorkflowRuns(ghClient *ghapi.GraphQLClient, workflow types.Workflow) ResultData

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