Help us shape the future of Go! Take the 2026 Go Developer Survey

run

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChecksService

type ChecksService interface {
	CreateCheckRun(ctx context.Context, owner, repo string, opts github.CreateCheckRunOptions) (*github.CheckRun, *github.Response, error)
	UpdateCheckRun(ctx context.Context, owner, repo string, checkRunID int64, opts github.UpdateCheckRunOptions) (*github.CheckRun, *github.Response, error)
}

ChecksService is an interface abstraction for GitHub ChecksService

type Config

type Config struct {
	ChecksService   ChecksService
	IsAuthenticated bool
}

Config holds the configuration pass on from the parent command

type Run

type Run struct {
	Owner           string        `short:"o" env:"CHECKS4SHELL_OWNER" required:"" help:"The owner of the target GitHub repo"`
	Repository      string        `short:"r" env:"CHECKS4SHELL_REPOSITORY" required:"" help:"The target GitHub repository"`
	CommitSHA       string        `short:"c" env:"CHECKS4SHELL_COMMIT_SHA" required:"" help:"The target SHA of the check Run to be created"`
	Name            string        `short:"n" env:"CHECKS4SHELL_NAME" required:"" help:"Name of the check Run"`
	Title           string        `short:"t" env:"CHECKS4SHELL_TITLE" required:"" help:"Output title of the check"`
	DetailsURL      string        `short:"u" env:"CHECKS4SHELL_DETAILS_URL" help:"Details URL of the check" `
	ExternalID      string        `short:"e" env:"CHECKS4SHELL_EXTERNAL_ID" help:"External ID of the check" `
	Summary         string        `` /* 130-byte string literal not displayed */
	Images          string        `` /* 187-byte string literal not displayed */
	Annotations     string        `` /* 197-byte string literal not displayed */
	UpdateFrequency time.Duration `short:"f" env:"CHECKS4SHELL_UPDATE_FREQUENCY" help:"Frequency to update the check run" default:"5s"`
	SyntaxHighlight string        `short:"l" env:"CHECKS4SHELL_SYNTAX_HIGHLIGHT" help:"syntax highlight you want to use for the terminal output"`
	Debug           bool          `short:"d" help:"Enable debug mode"`
	ShellCommand    []string      `arg:"" help:"Shell commands to Run and filling the check Run output text" required:""`
	// contains filtered or unexported fields
}

Run is the struct for the run command

func (*Run) AfterApply

func (r *Run) AfterApply(_ *kong.Context, cfg *Config) error

AfterApply will run on CLI and initialise the missing properties

func (*Run) Run

func (r *Run) Run(cfg *Config) error

Run runs the command

type SyncScreen

type SyncScreen struct {
	Screen *terminal.Screen
	Lock   *sync.RWMutex
}

SyncScreen wraps the terminal.Screen read write with a RWLock

func NewSyncScreen

func NewSyncScreen(opts ...terminal.ScreenOption) (*SyncScreen, error)

NewSyncScreen initiate a new instance of SyncScreen

func (*SyncScreen) ReadScreen

func (t *SyncScreen) ReadScreen() string

ReadScreen returns the AsPlainText from the wrapped screen

func (*SyncScreen) Write

func (t *SyncScreen) Write(p []byte) (n int, err error)

Write writes the given bytes into the screen

Jump to

Keyboard shortcuts

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