Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Applier ¶
type Applier struct {
// contains filtered or unexported fields
}
Applier can update a Git repo with an updated version of a file based on a RepositoryPushHook.
func New ¶
func New(l logr.Logger, c client.GitClient, cfgs *config.RepoConfiguration, opts ...updater.UpdaterFunc) *Applier
New creates and returns a new Applier.
func (*Applier) UpdateRepositories ¶
UpdateRepositories takes a list of repositories (e.g. from config) and for each it calls UpdateRepository, returning on any detected error.
func (*Applier) UpdateRepository ¶
func (u *Applier) UpdateRepository(ctx context.Context, cfg *config.Repository, newValue string) error
UpdateRepository does the job of fetching the existing file, optionally creating it if it does not exist, updating it, and then optionally creating a PR. It also supports file removal.
Click to show internal directories.
Click to hide internal directories.