Documentation
¶
Overview ¶
Package manifest creates a GitHub App through the manifest flow and writes its credentials to a PEM file and a .env file.
Index ¶
Constants ¶
const Timeout = 5 * time.Minute
Timeout bounds the whole manifest flow, from the plan to the code exchange.
Variables ¶
This section is empty.
Functions ¶
func DefaultAppName ¶
func DefaultAppName() string
DefaultAppName returns "badil-dev-" plus 6 random lowercase hex chars. GitHub App names are global, so the suffix avoids collisions without publishing anything about the developer's machine.
func Run ¶
Run creates a GitHub App through the manifest flow: it prints the plan, asks for confirmation unless opts.AssumeYes, serves the manifest form, exchanges the callback code for the App's credentials and writes the PEM and .env files.
Documented at https://docs.github.com/en/apps/sharing-github-apps/registering-a-github-app-from-a-manifest.
Types ¶
type Options ¶
type Options struct {
AppName string
GitopsRepoURL string
EnvPath string
PEMPath string
Owner string
WebhookURL string
AssumeYes bool
// GitHubURL is GITHUB_URL as the canonical base github.ParseWebURL
// returns and GitHubAPIURL is GITHUB_API_URL, validated
// (config.LoadGitHubURLs).
GitHubURL string
GitHubAPIURL string
}
Options configures Run.