github

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultCheckRunName = "Coverage report"

Variables

View Source
var ErrMissingWorkflowRunField = errors.New("event of type 'workflow_run' is missing 'workflow_run' field")

Functions

func NewClient

func NewClient(ctx context.Context, token string) *github.Client

Types

type CheckCreator

type CheckCreator interface {
	CreateCheckRun(ctx context.Context, owner, repo string, opts github.CreateCheckRunOptions) (*github.CheckRun, *github.Response, error)
}

CheckCreator is just an interface to allow easy testing

type CheckRun added in v0.0.4

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

CheckRun implements coverage report notification for github check runs.

func NewCheckRun added in v0.0.4

func NewCheckRun(ghAction *githubactions.Action, cc CheckCreator, checkName string) *CheckRun

func (*CheckRun) Notify added in v0.0.4

func (c *CheckRun) Notify(ctx context.Context, report *cover.Report, body string) error

Notify creates a check run into github pull request with the given coverage report.

type StepSummary added in v0.0.4

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

StepSummary implements coverage report notification for github actions step summary.

func NewStepSummary added in v0.0.4

func NewStepSummary(action *githubactions.Action) *StepSummary

func (*StepSummary) Notify added in v0.0.4

func (ss *StepSummary) Notify(_ context.Context, report *cover.Report, body string) error

Notify creates a check run into github pull request with the given coverage report.

Jump to

Keyboard shortcuts

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