github

package
v0.0.0-...-c4e4a60 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventInstallation        = "integration_installation"
	EventInstallationRequest = "integration_installation_request"
	EventIntegrationUpdate   = "integration.update"
)

Variables

This section is empty.

Functions

func FetchEvents

func FetchEvents(ctx context.Context, cfg config.Config, timestamp time.Time) ([]*github.AuditEntry, time.Time, error)

FetchEvents retrieves audit log entries for the two integration event types, stopping pagination once the stored cursor is encountered or pages run out. Returned events are ordered newest-first (as returned by the API).

func GenerateAccessToken

func GenerateAccessToken(ctx context.Context, appID, installationID, privateKeyPEM, org string) (string, error)

func ResolveInstallationIDs

func ResolveInstallationIDs(ctx context.Context, cfg config.Config) (map[string]int64, error)

ResolveInstallationIDs fetches all GitHub App installations for the org and returns a map of app slug → installation ID. This is used to build approval links for integration.update events, which do not carry an installation ID themselves.

Types

This section is empty.

Jump to

Keyboard shortcuts

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