gitbot

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: 0BSD Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepo

func NewRepo(tranport GitTransporter, provider config.GitProvider) *repo

Types

type DoCallback added in v0.2.4

type DoCallback func(ctx context.Context, dir string) (title string, body string, changed bool, err error)

type GitBot

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

func NewGitbot

func NewGitbot(name string, repo *repo, branch string, pr PullRequester) *GitBot

func (*GitBot) Do

func (bot *GitBot) Do(ctx context.Context, callback DoCallback) error

type GitTransporter

type GitTransporter interface {
	Path() string
	URL() string
	Auth() *url.Userinfo
	Refresh(ctx context.Context, branch string) error
	CheckoutBranch(ctx context.Context, branch string) error
	AddCommitPush(ctx context.Context, branch, title, description string) error
}

type PullRequester

type PullRequester interface {
	Open(ctx context.Context, src, target, title, description string) error
}

type Repos

type Repos map[string]*repo

type TemplateCommitMessenger

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

func NewTemplateCommitMessenger

func NewTemplateCommitMessenger(title, description string) TemplateCommitMessenger

func (TemplateCommitMessenger) Msg

func (c TemplateCommitMessenger) Msg(changes []krm.Change) (title, description string, err error)

Directories

Path Synopsis
provider

Jump to

Keyboard shortcuts

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