app

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Install added in v0.26.0

type Install struct {
	// contains filtered or unexported fields
}

func NewInstallation added in v0.26.0

func NewInstallation(req *http.Request, run *params.Run, repo *v1alpha1.Repository, gh *github.Provider, namespace string) *Install

func (*Install) GenerateJWT added in v0.26.0

func (ip *Install) GenerateJWT(ctx context.Context) (string, error)

GenerateJWT generates a JWT token for the GitHub App. It retrieves the application ID and private key, sets the claims, and signs the token.

func (*Install) GetAndUpdateInstallationID added in v0.26.0

func (ip *Install) GetAndUpdateInstallationID(ctx context.Context) (string, string, int64, error)

GetAndUpdateInstallationID retrieves and updates the installation ID for the GitHub App. It generates a JWT token, lists all installations, and matches repositories to their installation IDs. If a matching repository is found, it returns the enterprise host, token, and installation ID.

type JWTClaim

type JWTClaim struct {
	Issuer int64 `json:"iss"`
	jwt.RegisteredClaims
}

JWTClaim represents the JWT claims for the GitHub App.

Jump to

Keyboard shortcuts

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