scm/

directory
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MIT

README

Source Control Managers

This folder contains all Source Control Managers. They do all implement the VersionController interface described below.

type VersionController interface {
	// Should get repositories based on the scm configuration
	GetRepositories(ctx context.Context) ([]domain.Repository, error)
	// Creates a pull request. The repo parameter will always originate from the same package
	CreatePullRequest(ctx context.Context, repo domain.Repository, newPR domain.NewPullRequest) (domain.PullRequest, error)
	// Gets the latest pull requests from repositories based on the scm configuration
	GetPullRequests(ctx context.Context, branchName string) ([]domain.PullRequest, error)
	// Merges a pull request, the pr parameter will always originate from the same package
	MergePullRequest(ctx context.Context, pr domain.PullRequest) error
	// Close a pull request, the pr parameter will always originate from the same package
	ClosePullRequest(ctx context.Context, pr domain.PullRequest) error
}

The version controller can also implement additional functions to support features such as shell-autocompletion.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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