processor

package
v0.46.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPrOpen

func IsPrOpen(result Result) bool

IsPrOpen returns true for all types of results which indicate that a pull request is still open.

func ModifyRepositoryContent added in v0.40.0

func ModifyRepositoryContent(
	f exec.Exec,
	logger *zap.SugaredLogger,
	t *task.Task,
	repo host.Repository,
	dir string,
	scriptGen exec.ScriptGenerator,
) error

ModifyRepositoryContent executes the script of task to modify the content of a repository. It sets up the environment for the script. It uses dir to set the current working directory of the script. Actual execution is done by f.

Types

type ProcessResult

type ProcessResult struct {
	Error       error
	PullRequest *host.PullRequest
	Result      Result
	Task        *task.Task
}

type Processor

type Processor struct {
	Clock            clock.Clock
	DataDir          string
	Git              git.GitClient
	PullRequestCache host.PullRequestCache
	CommandExec      exec.Exec
	ScriptGenerator  exec.ScriptGenerator
}

func (*Processor) Process

func (p *Processor) Process(dryRun bool, repo host.Repository, tasks []*task.Task, doFilter bool) []ProcessResult

type RepositoryTaskProcessor

type RepositoryTaskProcessor interface {
	Process(dryRun bool, repo host.Repository, tasks []*task.Task, doFilter bool) []ProcessResult
}

type Result

type Result int
const (
	ResultUnknown Result = iota
	ResultAutoMergeTooEarly
	ResultBranchModified
	ResultChecksFailed
	ResultConflict
	ResultNoChanges
	ResultPrCreated
	ResultPrClosedBefore
	ResultPrClosed
	ResultPrMergedBefore
	ResultPrMerged
	ResultPrOpen
	ResultNoMatch
	ResultSkip
	ResultPushedDefaultBranch
	ResultArchived
)

func (Result) String

func (i Result) String() string

Jump to

Keyboard shortcuts

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