multigitter

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closer added in v0.13.0

type Closer struct {
	VersionController VersionController

	FeatureBranch string
}

Closer closes pull requests

func (Closer) Close added in v0.13.0

func (s Closer) Close(ctx context.Context) error

Close closes pull requests

type Merger

type Merger struct {
	VersionController VersionController

	FeatureBranch string
}

Merger merges pull requests in an organization

func (Merger) Merge

func (s Merger) Merge(ctx context.Context) error

Merge merges pull requests in an organization

type Printer added in v0.12.0

type Printer struct {
	VersionController VersionController

	ScriptPath string // Must be absolute path
	Arguments  []string
	Token      string

	Stdout io.Writer
	Stderr io.Writer

	FetchDepth int // Limit fetching to the specified number of commits. Set to 0 for no limit
	Concurrent int
}

Printer contains fields to be able to do the print command

func (Printer) Print added in v0.14.0

func (r Printer) Print(ctx context.Context) error

Print runs a script for multiple repositories and print the output of each run

type Runner

type Runner struct {
	VersionController VersionController

	ScriptPath    string // Must be absolute path
	Arguments     []string
	FeatureBranch string
	Token         string

	Output io.Writer

	CommitMessage    string
	PullRequestTitle string
	PullRequestBody  string
	Reviewers        []string
	MaxReviewers     int // If set to zero, all reviewers will be used
	DryRun           bool
	CommitAuthor     *domain.CommitAuthor
	BaseBranch       string // The base branch of the PR, use default branch if not set

	FetchDepth int // Limit fetching to the specified number of commits. Set to 0 for no limit
	Concurrent int
}

Runner contains fields to be able to do the run

func (Runner) Run

func (r Runner) Run(ctx context.Context) error

Run runs a script for multiple repositories and creates PRs with the changes made

type Statuser

type Statuser struct {
	VersionController VersionController

	Output io.Writer

	FeatureBranch string
}

Statuser checks the statuses of pull requests

func (Statuser) Statuses

func (s Statuser) Statuses(ctx context.Context) error

Statuses checks the statuses of pull requests

type VersionController

type VersionController interface {
	GetRepositories(ctx context.Context) ([]domain.Repository, error)
	CreatePullRequest(ctx context.Context, repo domain.Repository, newPR domain.NewPullRequest) (domain.PullRequest, error)
	GetPullRequestStatuses(ctx context.Context, branchName string) ([]domain.PullRequest, error)
	MergePullRequest(ctx context.Context, pr domain.PullRequest) error
	ClosePullRequest(ctx context.Context, pr domain.PullRequest) error
}

VersionController fetches repositories

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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