setup

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 5 Imported by: 0 modules, 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

Overview

Package setup integrates the github-app-setup-go installer, which creates the GitHub App from a manifest and saves its credentials.

Index

Constants

View Source
const (
	EnvAppID         = "APP_GITHUB_APP_ID"
	EnvPrivateKey    = "APP_GITHUB_APP_PRIVATE_KEY"
	EnvWebhookSecret = "APP_GITHUB_WEBHOOK_SECRET"
)

The names the application reads the GitHub App credentials from.

View Source
const AppName = "github-ops-app"

AppName is the default name of the GitHub App.

Variables

View Source
var Events = []string{"pull_request", "team", "membership"}

Events are the webhook events the application handles.

View Source
var Permissions = map[string]string{

	"administration":         "read",
	"checks":                 "read",
	"metadata":               "read",
	"pull_requests":          "read",
	"statuses":               "read",
	"vulnerability_alerts":   "read",
	"security_events":        "read",
	"secret_scanning_alerts": "read",

	"members": "write",
}

Permissions are the GitHub App permissions the application needs, and no more.

Functions

func Manifest

func Manifest() installer.Manifest

Manifest returns the GitHub App manifest. The app is private, so only the organization that creates it can install it.

Types

type NopStore

type NopStore struct{}

NopStore is a credential store for when the installer is disabled.

func (NopStore) DisableInstaller

func (NopStore) DisableInstaller(context.Context) error

func (NopStore) Save

func (NopStore) Status

type Store

type Store struct {
	configstore.Store
}

Store wraps a credential store so the credentials are also saved under the names the application reads. The store's own names, such as GITHUB_APP_ID, are still written, since its status checks read them.

func (Store) Save

func (s Store) Save(ctx context.Context, creds *configstore.AppCredentials) error

Save adds the application's names for the credentials and saves them.

Jump to

Keyboard shortcuts

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