applier

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

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

New creates and returns a new Applier.

func (*Applier) UpdateRepositories

func (u *Applier) UpdateRepositories(ctx context.Context, newValue string) error

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.

Jump to

Keyboard shortcuts

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