github

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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