gitrepository

package
v0.0.0-...-f45c986 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReconcilers

func GetReconcilers(k8s client.Client) core.GroupedReconcilers

Types

type AmendReconciler

type AmendReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

AmendReconciler reconciles a GitRepository object See the main reason for this controller, https://github.com/kubesphere/ks-devops/issues/567

func (*AmendReconciler) GetGroupName

func (r *AmendReconciler) GetGroupName() string

func (*AmendReconciler) GetName

func (r *AmendReconciler) GetName() string

func (*AmendReconciler) Reconcile

func (r *AmendReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

func (*AmendReconciler) SetupWithManager

func (r *AmendReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type GitProviderAmend

type GitProviderAmend interface {
	// Match determine if the implement wants to amend it
	Match(*v1alpha3.GitRepository) bool
	// Amend tries to amend it, returns true if any changes happened
	Amend(*v1alpha3.GitRepository) bool
}

GitProviderAmend is the interface of all the potential git providers

type PullRequestStatusReconciler

type PullRequestStatusReconciler struct {
	client.Client
	ExternalAddress string
	ClusterName     string
	// contains filtered or unexported fields
}

PullRequestStatusReconciler reconciles a Pipeline build status to the Pull Requests

func (*PullRequestStatusReconciler) GetGroupName

func (r *PullRequestStatusReconciler) GetGroupName() string

GetGroupName returns the gorup name of the set of reconcilers

func (*PullRequestStatusReconciler) GetName

func (r *PullRequestStatusReconciler) GetName() string

GetName returns the name of this reconciler

func (*PullRequestStatusReconciler) Reconcile

func (r *PullRequestStatusReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
	result ctrl.Result, err error)

Reconcile is the main entry of this reconciler

func (*PullRequestStatusReconciler) SetupWithManager

func (r *PullRequestStatusReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type Reconciler

type Reconciler struct {
	client.Client
	// contains filtered or unexported fields
}

Reconciler reconciles a GitRepository object

func (*Reconciler) GetGroupName

func (r *Reconciler) GetGroupName() string

func (*Reconciler) GetName

func (r *Reconciler) GetName() string

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type StatusMaker

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

StatusMaker responsible for Pull Requests status creating

func NewStatusMaker

func NewStatusMaker(repo, token string) *StatusMaker

NewStatusMaker creates an instance of statusMaker

func (*StatusMaker) Create

func (s *StatusMaker) Create(ctx context.Context, status scm.State, label, desc string) (err error)

Create creates a generic status

func (*StatusMaker) CreateWithPipelinePhase

func (s *StatusMaker) CreateWithPipelinePhase(ctx context.Context, phase v1alpha3.RunPhase, label, desc string) (err error)

CreateWithPipelinePhase creates a generic status with the PipelineRun phase

func (*StatusMaker) FindPreviousStatus

func (s *StatusMaker) FindPreviousStatus(ctx context.Context, scmClient *scm.Client, sha, label string) (target *scm.Status, err error)

FindPreviousStatus finds the existing status by sha and label

func (*StatusMaker) WithExpirationCheck

func (s *StatusMaker) WithExpirationCheck(check expirationCheckFunc) *StatusMaker

WithExpirationCheck set the expiration check function

func (*StatusMaker) WithPR

func (s *StatusMaker) WithPR(pr int) *StatusMaker

WithPR sets the pr number

func (*StatusMaker) WithProvider

func (s *StatusMaker) WithProvider(provider string) *StatusMaker

WithProvider sets the provider

func (*StatusMaker) WithServer

func (s *StatusMaker) WithServer(server string) *StatusMaker

WithServer sets the server

func (*StatusMaker) WithTarget

func (s *StatusMaker) WithTarget(target string) *StatusMaker

WithTarget sets the target URL

func (*StatusMaker) WithUsername

func (s *StatusMaker) WithUsername(username string) *StatusMaker

WithUsername sets the username

type WebhookReconciler

type WebhookReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

WebhookReconciler notifies the GitRepositories if there are corresponding webhooks changed

func (*WebhookReconciler) GetGroupName

func (r *WebhookReconciler) GetGroupName() string

func (*WebhookReconciler) GetName

func (r *WebhookReconciler) GetName() string

func (*WebhookReconciler) Reconcile

func (r *WebhookReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error)

Reconcile handles the update events of Webhook, then send the notification to a GitRepository

func (*WebhookReconciler) SetupWithManager

func (r *WebhookReconciler) SetupWithManager(mgr ctrl.Manager) error

Jump to

Keyboard shortcuts

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