multigitter

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 12 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 Runner

type Runner struct {
	VersionController VersionController

	ScriptPath    string // Must be absolute path
	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
}

Runner conains 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

Jump to

Keyboard shortcuts

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