Documentation
¶
Index ¶
- Variables
- func AccountConnectionRequired(ctx context.Context) bool
- func ConvertManifest(httpCtx core.HTTPContext, code string) (config.GitHubHostedAppConfig, error)
- func CreateURL() string
- func CreatedPath() string
- func Enabled(ctx context.Context, tx *gorm.DB, encryptor crypto.Encryptor) bool
- func OAuthCallbackURL(baseURL string) string
- func ProcessEnabled(ctx context.Context) bool
- func PublicManifestJSON(baseURL, webhooksBaseURL string) (string, error)
- func Resolve(ctx context.Context, tx *gorm.DB, encryptor crypto.Encryptor) (config.GitHubHostedAppConfig, error)
- func ResolveProcess(ctx context.Context) (config.GitHubHostedAppConfig, error)
- func SafeReturnPath(path string) string
- func Save(ctx context.Context, tx *gorm.DB, encryptor crypto.Encryptor, ...) error
- func SignCreateState(secret, returnPath string, accountID uuid.UUID) (string, error)
- func UserConnectReady(_ context.Context) bool
- func VerifyCreateState(secret, state string) (string, uuid.UUID, error)
- type Catalog
- func (c *Catalog) EnqueueRefresh(repositoryIDs []int64) error
- func (c *Catalog) HasInstallationRequest(ctx context.Context, installationID int64) (bool, error)
- func (c *Catalog) Reconcile(ctx context.Context, priority models.VCSProviderRepositorySyncPriority) error
- func (c *Catalog) ReconcileInstallRequests(ctx context.Context) error
- func (c *Catalog) ReconcileInstallation(ctx context.Context, installationID int64, ...) error
- func (c *Catalog) SyncRepositoryCollaborators(ctx context.Context, repositoryID int64) error
- func (c *Catalog) VerifyInstallation(ctx context.Context, installationID int64) error
- type CreateForm
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyConfigured = errors.New("GitHub App is already configured")
Functions ¶
func AccountConnectionRequired ¶
AccountConnectionRequired reports whether repository access stays on the linked GitHub account. Cloud sets the public GitHub App, the login client, or both. A self-hosted app stored on the installation does not.
func ConvertManifest ¶
func ConvertManifest(httpCtx core.HTTPContext, code string) (config.GitHubHostedAppConfig, error)
func CreatedPath ¶
func CreatedPath() string
func OAuthCallbackURL ¶
func ProcessEnabled ¶
func PublicManifestJSON ¶
func Resolve ¶
func Resolve(ctx context.Context, tx *gorm.DB, encryptor crypto.Encryptor) (config.GitHubHostedAppConfig, error)
Resolve returns the public GitHub App for this request. Process environment wins so Cloud keeps env-only credentials. Self-host stores the app on the installation after the first-run create step.
func ResolveProcess ¶
func ResolveProcess(ctx context.Context) (config.GitHubHostedAppConfig, error)
ResolveProcess reads the public GitHub App using the process encryptor.
func SafeReturnPath ¶
func SignCreateState ¶
func UserConnectReady ¶
UserConnectReady reports whether GitHub account connection can start. Cloud sets GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET. A self-hosted app does not offer Sign in with GitHub.
Types ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
Catalog synchronizes the public SuperPlane GitHub App into the global installation catalog. It never uses a GitHub user OAuth token.
func NewCatalog ¶
func (*Catalog) EnqueueRefresh ¶
EnqueueRefresh schedules database-cached repositories only. It does not block the request on GitHub.
func (*Catalog) HasInstallationRequest ¶
func (*Catalog) Reconcile ¶
func (c *Catalog) Reconcile(ctx context.Context, priority models.VCSProviderRepositorySyncPriority) error
Reconcile imports installations, repositories, and pending approval requests. App-JWT requests follow the endpoints and pagination documented in onboarding-guide.md.
func (*Catalog) ReconcileInstallRequests ¶
ReconcileInstallRequests replaces the stored approval requests with the current GitHub list. GitHub sends no webhook when a member requests the App or cancels a request, so this list is the only source.
func (*Catalog) ReconcileInstallation ¶
func (*Catalog) SyncRepositoryCollaborators ¶
func (*Catalog) VerifyInstallation ¶
VerifyInstallation reads one installation from GitHub without its repositories. GitHub does not always send a webhook when an App is uninstalled, so an installation that GitHub no longer has is deleted here.