Help us shape the future of Go! Take the 2026 Go Developer Survey

patch

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoPatches = errors.New("no patches configured for repository")
)

Functions

func Apply

func Apply(repoDir string, patch config.PackageRepoPatch, tmplCtx TemplateContext) error

func ApplyMany

func ApplyMany(repoDir string, patches []config.PackageRepoPatch, tmplCtx TemplateContext) error

Types

type Patcher

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

func New

func New(cfg *config.Config) (Patcher, error)

func (Patcher) CloneAndPublishAll

func (p Patcher) CloneAndPublishAll(pkgRepos []config.PackageRepo, tmplCtx TemplateContext) ([]github.PullRequest, error)

func (Patcher) CloneAndPublishRepo

func (p Patcher) CloneAndPublishRepo(pkgRepo config.PackageRepo, tmplCtx TemplateContext) (github.PullRequest, error)

func (Patcher) CloneRepo

func (p Patcher) CloneRepo(remote string, tmplCtx TemplateContext) (*Repo, error)

func (Patcher) TestGitHubConnection

func (p Patcher) TestGitHubConnection(ctx context.Context) error

type Repo

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

func (*Repo) ApplyManyAndCommit

func (p *Repo) ApplyManyAndCommit(patches []config.PackageRepoPatch) error

func (*Repo) ApplyManyInNewBranch

func (p *Repo) ApplyManyInNewBranch(patches []config.PackageRepoPatch) error

func (*Repo) Close

func (p *Repo) Close() error

func (*Repo) PublishChanges

func (p *Repo) PublishChanges() (github.PullRequest, error)

func (*Repo) PublishChangesUnlessDryRun

func (p *Repo) PublishChangesUnlessDryRun() (github.PullRequest, error)

type TemplateContext

type TemplateContext struct {
	Package   string
	Version   string
	JiraIssue string
}

type TemplateContextRegex

type TemplateContextRegex struct {
	TemplateContext
	Groups []string
}

Jump to

Keyboard shortcuts

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