githubapp

package
v1.0.46424-pre Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package githubapp drives the CircleCI GitHub App onboarding steps: checking whether the app is installed for an organization, walking the user through a browser-based install, and resolving a repository's external ID.

Index

Constants

This section is empty.

Variables

View Source
var ErrTooManyRepositories = errors.New("too many repositories to search for a match")

ErrTooManyRepositories reports that the search hit its page cap before examining every repository, so the target may well be accessible. Callers must not report it as "the app cannot access that repository" — the advice that follows from that, grant access and re-run, searches the same bounded prefix again.

Functions

func EnsureInstalled

func EnsureInstalled(ctx context.Context, client *apiclient.Client, orgID, returnURL string, noBrowser bool) (bool, error)

EnsureInstalled reports whether the CircleCI GitHub App is installed for the organization, walking the user through a browser-based install when it is not. returnURL is where GitHub redirects after install.

Non-interactive sessions (or noBrowser) print the install URL and return false without waiting. Callers degrade to manual guidance on false or on an error.

func ResolveRepoID

func ResolveRepoID(ctx context.Context, client *apiclient.Client, orgID, repoFullName string) (string, error)

ResolveRepoID returns the external (numeric) ID of repoFullName ("owner/repo") among the repositories the GitHub App can access for the organization. The endpoint offers no name filter, so the list has to be walked.

It returns "" with no error only when the whole list was examined and held no match; hitting the page cap first returns ErrTooManyRepositories.

Types

This section is empty.

Jump to

Keyboard shortcuts

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