github

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GitHubHost = "github.com"
)

Functions

func ConfigureSSHKey

func ConfigureSSHKey(props *props.Props, cfg config.Containable, opts ...ConfigureSSHKeyOption) (string, string, error)

func NewCmdInitGitHub

func NewCmdInitGitHub(p *props.Props) *cobra.Command

NewCmdInitGitHub creates the `init github` subcommand.

func RunGitHubInit

func RunGitHubInit(p *props.Props, cfg config.Containable) error

RunGitHubInit forcibly runs both login and SSH configuration regardless of current state. This is used by the explicit `init github` command.

func RunInitCmd

func RunInitCmd(p *props.Props, dir string) error

RunInitCmd executes the GitHub configuration and writes the results to the config file.

Types

type ConfigureSSHKeyOption

type ConfigureSSHKeyOption func(*configureSSHKeyConfig)

func WithGenerateKeyOptions

func WithGenerateKeyOptions(opts ...GenerateKeyOption) ConfigureSSHKeyOption

func WithSSHKeyPathForm

func WithSSHKeyPathForm(creator func(*string) *huh.Form) ConfigureSSHKeyOption

func WithSSHKeySelectForm

func WithSSHKeySelectForm(creator func(*string, []huh.Option[string]) *huh.Form) ConfigureSSHKeyOption

type GenerateKeyOption

type GenerateKeyOption func(*generateKeyConfig)

func WithPassphraseForm

func WithPassphraseForm(creator func(*string) *huh.Form) GenerateKeyOption

func WithUploadConfirmForm

func WithUploadConfirmForm(creator func(*bool) *huh.Form) GenerateKeyOption

type GitHubInitialiser

type GitHubInitialiser struct {
	SkipLogin bool
	SkipKey   bool
}

GitHubInitialiser handles both GitHub authentication and SSH key configuration.

func NewGitHubInitialiser

func NewGitHubInitialiser(p *props.Props, skipLogin, skipKey bool) *GitHubInitialiser

NewGitHubInitialiser creates a new GitHubInitialiser and mounts its assets.

func (*GitHubInitialiser) Configure

func (g *GitHubInitialiser) Configure(props *props.Props, cfg config.Containable) error

Configure runs the interactive login and/or SSH configuration.

func (*GitHubInitialiser) IsConfigured

func (g *GitHubInitialiser) IsConfigured(cfg config.Containable) bool

IsConfigured returns true if unskipped components are already present in the config.

func (*GitHubInitialiser) Name

func (g *GitHubInitialiser) Name() string

Jump to

Keyboard shortcuts

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