github

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingAuth = errors.New("missing GitHub authentication environment variables")

	ErrInvalidAuth = errors.New("invalid GitHub authentication")
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, cfg Config) (Client, error)

func (Client) Comment

func (c Client) Comment(ctx context.Context, org, repo string, nr int, comment string) error

func (Client) HideCommentsWithPrefix

func (c Client) HideCommentsWithPrefix(ctx context.Context, org, repo string, nr int, prefix string) error

type Config

type Config struct {
	Token string `envconfig:"GITHUB_TOKEN"`

	AppPrivateKey     string `envconfig:"GITHUB_APP_PRIVATE_KEY"`
	AppID             int64  `envconfig:"GITHUB_APP_ID"`
	AppInstallationID int64  `envconfig:"GITHUB_APP_INSTALLATION_ID"`

	Owner string `envconfig:"GITHUB_REPOSITORY_OWNER" default:"grafana"`
	Repo  string `envconfig:"GITHUB_REPOSITORY_NAME" default:"deployment_tools"`
}

func (Config) Validate

func (c Config) Validate() error

Jump to

Keyboard shortcuts

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