pkg

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GitTag    = ""
	GitCommit = ""
)

Functions

func Pointer added in v1.0.7

func Pointer[T interface{}](item T) *T

Types

type AppResults added in v1.1.1

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

func (*AppResults) AddCheckResult added in v1.1.1

func (ar *AppResults) AddCheckResult(result CheckResult)

type CheckResult added in v1.1.1

type CheckResult struct {
	State            CommitState
	Summary, Details string
}

type CommitState added in v1.1.1

type CommitState uint8

CommitState is an enum for represnting the state of a commit for posting via CommitStatus

const (
	StateNone CommitState = iota
	StateSuccess
	StateRunning
	StateWarning
	StateFailure
	StateError
	StatePanic
)

func WorstState added in v1.1.1

func WorstState(l1, l2 CommitState) CommitState

func (CommitState) BareString added in v1.1.1

func (s CommitState) BareString() string

func (CommitState) Emoji added in v1.1.1

func (s CommitState) Emoji() string

Emoji returns a string representation of this state for use in the request

func (CommitState) String added in v1.1.1

func (s CommitState) String() string

type Message added in v1.1.1

type Message struct {
	Name    string
	Owner   string
	CheckID int
	NoteID  int
	// contains filtered or unexported fields
}

Message type that allows concurrent updates Has a reference to the owner/repo (ie zapier/kubechecks), the PR/MR id, and the actual messsage

func NewMessage added in v1.1.1

func NewMessage(name string, prId, commentId int) *Message

func (*Message) AddNewApp added in v1.1.1

func (m *Message) AddNewApp(ctx context.Context, app string)

func (*Message) AddToAppMessage added in v1.1.1

func (m *Message) AddToAppMessage(ctx context.Context, app string, result CheckResult)

func (*Message) BuildComment added in v1.3.0

func (m *Message) BuildComment(ctx context.Context) string

func (*Message) IsSuccess added in v1.1.1

func (m *Message) IsSuccess() bool

func (*Message) SetFooter added in v1.1.1

func (m *Message) SetFooter(start time.Time, commitSha string)

Jump to

Keyboard shortcuts

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