applier

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2020 License: Apache-2.0 Imports: 10 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) UpdateFromHook

func (u *Applier) UpdateFromHook(ctx context.Context, h hooks.PushEvent) error

UpdateFromHook takes the incoming hook and triggers an update based on the configuration for the repo in the hook (if one matches).

func (*Applier) UpdateRepository

func (u *Applier) UpdateRepository(ctx context.Context, cfg *config.Repository, newURL string) error

UpdateRepository does the job of fetching the existing file, updating it, and then optionally creating a PR.

Jump to

Keyboard shortcuts

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