Versions in this module Expand all Collapse all v0 v0.0.3 Aug 21, 2020 Changes in this version + var ErrAbortTransaction = errors.New("transaction aborted") + var ErrNoPullRequestProvider = errors.New("no pull request provider given") + var ErrTransactionActive = errors.New("transaction is active") + type CommitResult interface + GetAuthorEmail func() string + GetAuthorName func() string + GetDescription func() string + GetMessage func() string + GetTitle func() string + Validate func() error + type GenericCommitResult struct + AuthorEmail string + AuthorName string + Description string + Title string + func (r *GenericCommitResult) GetAuthorEmail() string + func (r *GenericCommitResult) GetAuthorName() string + func (r *GenericCommitResult) GetDescription() string + func (r *GenericCommitResult) GetMessage() string + func (r *GenericCommitResult) GetTitle() string + func (r *GenericCommitResult) Validate() error + type GenericPullRequestResult struct + Assignees []string + Labels []string + Milestone string + func (r *GenericPullRequestResult) GetAssignees() []string + func (r *GenericPullRequestResult) GetLabels() []string + func (r *GenericPullRequestResult) GetMilestone() string + func (r *GenericPullRequestResult) Validate() error + type GenericPullRequestSpec struct + MainBranch string + MergeBranch string + RepositoryRef gitprovider.RepositoryRef + func (r *GenericPullRequestSpec) GetMainBranch() string + func (r *GenericPullRequestSpec) GetMergeBranch() string + func (r *GenericPullRequestSpec) GetRepositoryRef() gitprovider.RepositoryRef + func (r *GenericPullRequestSpec) Validate() error + type GitStorage struct + func (s *GitStorage) Transaction(ctx context.Context, streamName string, fn TransactionFunc) error + type PullRequestProvider interface + CreatePullRequest func(ctx context.Context, spec PullRequestSpec) error + type PullRequestResult interface + GetAssignees func() []string + GetLabels func() []string + GetMilestone func() string + type PullRequestSpec interface + GetMainBranch func() string + GetMergeBranch func() string + GetRepositoryRef func() gitprovider.RepositoryRef + type TransactionFunc func(ctx context.Context, s storage.Storage) (CommitResult, error) + type TransactionStorage interface + Transaction func(ctx context.Context, streamName string, fn TransactionFunc) error + func NewGitStorage(gitDir gitdir.GitDirectory, prProvider PullRequestProvider, ...) (TransactionStorage, error)