multigitter

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

	Concurrent int
}

Printer contains fields to be able to do the print command

func (Printer) Output added in v0.12.0

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

type Runner

type Runner struct {
	VersionController VersionController

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

	CommitMessage    string
	PullRequestTitle string
	PullRequestBody  string
	Reviewers        []string
	MaxReviewers     int // If set to zero, all reviewers will be used
	DryRun           bool
	CommitAuthor     *domain.CommitAuthor

	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

	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) error
	GetPullRequestStatuses(ctx context.Context, branchName string) ([]domain.PullRequest, error)
	MergePullRequest(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