githubapp

package
v1.0.46087-pre Latest Latest
Warning

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

Go to latest
Published: Jul 30, 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. It talks to the public v2 GitHub App endpoints exposed by public-api-service.

Index

Constants

This section is empty.

Variables

This section is empty.

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. orgID is the organization UUID; returnURL is where GitHub redirects after install (an app.circleci.com URL).

It returns true once the app is installed. In non-interactive sessions (or with noBrowser), it prints the install URL and returns false without waiting. A returned error is a genuine API failure; callers typically degrade to manual guidance on either a false result or an error.

func ResolveRepoID

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

ResolveRepoID returns the external (numeric) ID of the repository named repoFullName ("owner/repo") among the repositories the GitHub App can access for the organization. It returns "" (with no error) when the repository is not found — e.g. it exists but was not granted to the app.

Types

This section is empty.

Jump to

Keyboard shortcuts

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