githubapp

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenInBrowser

func OpenInBrowser(u string) error

Types

type AppConfigResult

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

AppConfigResult represents a GitHub App configuration result.

type GitHubApp

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

GitHubApp represents a GitHub App, is responsible to provide the necessary structure for the GitHub oAuth2 workflow. GitHub Apps are protected with JWT web token, thus the oAuth2 workflow uses the (primary) browser to interact with 2FA and other GitHub security measures.

func NewGitHubApp

func NewGitHubApp(logger *slog.Logger) *GitHubApp

NewGitHubApp creates a new GitHub App instance.

func (*GitHubApp) Create

func (g *GitHubApp) Create(
	ctx context.Context,
	manifest scrape.AppManifest,
) (*github.AppConfig, error)

Create creates a new GitHub App using the provided manifest. The manifest is submitted to GitHub using a regular web form to leverate the required OAuth2 flow.

func (*GitHubApp) PersistentFlags

func (g *GitHubApp) PersistentFlags(cmd *cobra.Command)

PersistentFlags sets the persistent flags for the GitHub App.

func (*GitHubApp) Validate

func (g *GitHubApp) Validate() error

Validate validates the GitHub App configuration.

Jump to

Keyboard shortcuts

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