context

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunDataKeyAssignees = "sb.assignees"
	RunDataKeyReviewers = "sb.reviewers"
)

Variables

This section is empty.

Functions

func Log added in v0.16.0

func Log(ctx context.Context) *zap.SugaredLogger

Log returns the logger from the context. If the context doesn't contain a logger then it returns the default logger.

func RunData added in v0.8.0

func RunData(ctx context.Context) map[string]string

RunData reads and returns plugin data from the context. It initialize the map if the context does not contain plugin data.

func WithLog added in v0.16.0

func WithLog(parent context.Context, logger *zap.SugaredLogger) context.Context

WithLog returns a context with logger added to it.

func WithRunData added in v0.16.0

func WithRunData(ctx context.Context, data map[string]string) context.Context

WithRunData adds run data to the context.Context. If the context already contains run data, then it updates the existing map. If a key in the map already exists then it gets overwritten.

Types

type CheckoutPath

type CheckoutPath struct{}

type PullRequestKey added in v0.2.0

type PullRequestKey struct{}

type RepositoryKey

type RepositoryKey struct{}

Jump to

Keyboard shortcuts

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