commit

package
v2.14.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteForPaths

func WriteForPaths(rootPath string, repoUrl string, drySha string, paths []*apiclient.PathDetails) error

WriteForPaths writes the manifests, hydrator.metadata, and README.md files for each path in the provided paths. It also writes a root-level hydrator.metadata file containing the repo URL and dry SHA.

Types

type RepoClientFactory

type RepoClientFactory interface {
	NewClient(repo *v1alpha1.Repository, rootPath string) (git.Client, error)
}

RepoClientFactory is a factory for creating git clients for a repository.

func NewRepoClientFactory

func NewRepoClientFactory(gitCredsStore git.CredsStore, metricsServer *metrics.Server) RepoClientFactory

NewRepoClientFactory returns a new instance of the repo client factory.

type Service

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

Service is the service that handles commit requests.

func NewService

func NewService(gitCredsStore git.CredsStore, metricsServer *metrics.Server) *Service

NewService returns a new instance of the commit service.

func (*Service) CommitHydratedManifests

CommitHydratedManifests handles a commit request. It clones the repository, checks out the sync branch, checks out the target branch, clears the repository contents, writes the manifests to the repository, commits the changes, and pushes the changes. It returns the hydrated revision SHA and an error if one occurred.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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