gerrit

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const FooterBranch = "MultiGitter-Branch"
View Source
const FooterChangeID = "Change-Id"
View Source
const QueryChangesLimit = 100
View Source
const QueryProjectsLimit = 100
View Source
const RefHeadsPrefix = "refs/heads/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Gerrit

type Gerrit struct {
	// contains filtered or unexported fields
}

func New

func New(username, token, baseURL, repoSearch string) (*Gerrit, error)

func (Gerrit) ClosePullRequest

func (g Gerrit) ClosePullRequest(ctx context.Context, pr scm.PullRequest) error

func (Gerrit) CreatePullRequest

func (g Gerrit) CreatePullRequest(ctx context.Context, repo scm.Repository, _ scm.Repository, newPR scm.NewPullRequest) (scm.PullRequest, error)

func (Gerrit) EnhanceCommit

func (g Gerrit) EnhanceCommit(ctx context.Context, repo scm.Repository, branchName string, commitMessage string) (string, error)

func (Gerrit) FeatureBranchExist

func (g Gerrit) FeatureBranchExist(ctx context.Context, repo scm.Repository, branchName string) (bool, error)

func (Gerrit) ForkRepository

func (Gerrit) ForkRepository(_ context.Context, _ scm.Repository, _ string) (scm.Repository, error)

func (Gerrit) GetOpenPullRequest

func (g Gerrit) GetOpenPullRequest(ctx context.Context, repo scm.Repository, branchName string) (scm.PullRequest, error)

func (Gerrit) GetPullRequests

func (g Gerrit) GetPullRequests(ctx context.Context, branchName string) ([]scm.PullRequest, error)

func (Gerrit) GetRepositories

func (g Gerrit) GetRepositories(ctx context.Context) ([]scm.Repository, error)

func (Gerrit) MergePullRequest

func (g Gerrit) MergePullRequest(ctx context.Context, pr scm.PullRequest) error

func (Gerrit) RemoteReference

func (g Gerrit) RemoteReference(baseBranch string, featureBranch string, skipPullRequest bool, pushOnly bool) string

func (Gerrit) UpdatePullRequest

func (g Gerrit) UpdatePullRequest(ctx context.Context, repo scm.Repository, _ scm.PullRequest, updatedPR scm.NewPullRequest) (scm.PullRequest, error)

type GoGerritClient

type GoGerritClient interface {
	ListProjects(ctx context.Context, opt *gogerrit.ProjectOptions) (*map[string]gogerrit.ProjectInfo, *gogerrit.Response, error)
	QueryChanges(ctx context.Context, opt *gogerrit.QueryChangeOptions) (*[]gogerrit.ChangeInfo, *gogerrit.Response, error)
	AbandonChange(ctx context.Context, changeID string, input *gogerrit.AbandonInput) (*gogerrit.ChangeInfo, *gogerrit.Response, error)
	SubmitChange(ctx context.Context, changeID string, input *gogerrit.SubmitInput) (*gogerrit.ChangeInfo, *gogerrit.Response, error)
	GetHEAD(ctx context.Context, projectName string) (string, *gogerrit.Response, error)
}

Jump to

Keyboard shortcuts

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