controller

package
v0.0.0-...-8ee384e Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CheckRunStatusQueued     = "queued"
	CheckRunStatusInProgress = "in_progress"
	CheckRunStatusCompleted  = "completed"

	CheckRunConclusionSuccess        = "success"
	CheckRunConclusionFailure        = "failure"
	CheckRunConclusionCancelled      = "cancelled"
	CheckRunConclusionTimeout        = "timed_out"
	CheckRunConclusionActionRequired = "action_required"
)
View Source
const (
	StatePending = "pending"
	StateSuccess = "success"
	StateError   = "error"
	StateFailure = "failure"
)

Variables

This section is empty.

Functions

func UpsertCheckRun

func UpsertCheckRun(ctx context.Context, client *github.Client, tr *v1beta1.TaskRun, output *github.CheckRunOutput) (*github.CheckRun, error)

UpsertCheckRun updates or creates a check run for the given TaskRun.

Types

type GitHubAppReconciler

type GitHubAppReconciler struct {
	Logger        *zap.SugaredLogger
	TaskRunLister listers.TaskRunLister
	GitHub        *GitHubClientFactory
	Kubernetes    kubernetes.Interface
	Tekton        tektonclient.TektonV1beta1Interface
}

GitHubAppReconciler updates CheckRun results for PipelineRun outputs.

func (*GitHubAppReconciler) HandleCheckRun

func (r *GitHubAppReconciler) HandleCheckRun(ctx context.Context, log *zap.SugaredLogger, tr *v1beta1.TaskRun) error

func (*GitHubAppReconciler) HandleStatus

func (r *GitHubAppReconciler) HandleStatus(ctx context.Context, tr *v1beta1.TaskRun) error

func (*GitHubAppReconciler) Reconcile

func (r *GitHubAppReconciler) Reconcile(ctx context.Context, reconcileKey string) error

Reconcile creates or updates the check run.

type GitHubClientFactory

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

func NewApp

func NewApp(rt http.RoundTripper, appID int64, privateKeyPath string) (*GitHubClientFactory, error)

func NewStatic

func NewStatic(client *github.Client) *GitHubClientFactory

func (*GitHubClientFactory) NewClient

func (f *GitHubClientFactory) NewClient(installationID string) (*github.Client, error)

NewClient provides a GitHub API client based on the configured factory. If an Static factory is configured, the installation ID is ignored. An empty installation ID is valid for static factories. If an App factory is configured, the installation ID is used to configure an installation client.

Jump to

Keyboard shortcuts

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