vcs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TF_BUDDY_AUTO_MERGE = "TFBUDDY_ALLOW_AUTO_MERGE"

Variables

This section is empty.

Functions

func IsGlobalAutoMergeEnabled added in v0.3.0

func IsGlobalAutoMergeEnabled() bool

Types

type Commit

type Commit interface {
	GetSHA() string
}

type CommitStatus

type CommitStatus interface {
	Info() string
}

type CommitStatusOptions

type CommitStatusOptions interface {
	GetName() string
	GetContext() string
	GetTargetURL() string
	GetDescription() string
	GetState() string
	GetPipelineID() int
}

type DetailedMR

type DetailedMR interface {
	HasConflicts() bool
	MR
	GetWebURL() string
	GetTitle() string
}

type GitClient

type GitClient interface {
	GetMergeRequestApprovals(ctx context.Context, id int, project string) (MRApproved, error)
	CreateMergeRequestComment(ctx context.Context, id int, fullPath string, comment string) error
	CreateMergeRequestDiscussion(ctx context.Context, mrID int, fullPath string, comment string) (MRDiscussionNotes, error)
	GetMergeRequest(context.Context, int, string) (DetailedMR, error)
	GetRepoFile(context.Context, string, string, string) ([]byte, error)
	GetMergeRequestModifiedFiles(ctx context.Context, mrIID int, projectID string) ([]string, error)
	CloneMergeRequest(context.Context, string, MR, string) (GitRepo, error)
	UpdateMergeRequestDiscussionNote(ctx context.Context, mrIID, noteID int, project, discussionID, comment string) (MRNote, error)
	ResolveMergeRequestDiscussion(context.Context, string, int, string) error
	AddMergeRequestDiscussionReply(ctx context.Context, mrIID int, project, discussionID, comment string) (MRNote, error)
	SetCommitStatus(ctx context.Context, projectWithNS string, commitSHA string, status CommitStatusOptions) (CommitStatus, error)
	GetPipelinesForCommit(ctx context.Context, projectWithNS string, commitSHA string) ([]ProjectPipeline, error)
	GetOldRunUrls(ctx context.Context, mrIID int, project string, rootCommentID int) (string, error)
	MergeMR(ctx context.Context, mrIID int, project string) error
}

type GitRepo

type GitRepo interface {
	FetchUpstreamBranch(string) error
	GetMergeBase(oldest, newest string) (string, error)
	GetModifiedFileNamesBetweenCommits(oldest, newest string) ([]string, error)
	GetLocalDirectory() string
}

type MR

type MR interface {
	MRBranches
	GetAuthor() MRAuthor
	GetInternalID() int
}

type MRApproved

type MRApproved interface {
	IsApproved() bool
}

type MRAttributes

type MRAttributes interface {
	GetNote() string
	GetType() string
	MRDiscussion
}

type MRAuthor

type MRAuthor interface {
	GetUsername() string
}

type MRBranches

type MRBranches interface {
	GetSourceBranch() string
	GetTargetBranch() string
}

type MRCommentEvent

type MRCommentEvent interface {
	GetProject() Project
	GetMR() MR
	GetAttributes() MRAttributes
	GetLastCommit() Commit
}

type MRDiscussion

type MRDiscussion interface {
	GetDiscussionID() string
}

type MRDiscussionNotes

type MRDiscussionNotes interface {
	GetMRNotes() []MRNote
	MRDiscussion
}

type MRNote

type MRNote interface {
	GetNoteID() int64
}

type Project

type Project interface {
	GetPathWithNamespace() string
}

type ProjectPipeline

type ProjectPipeline interface {
	GetSource() string
	GetID() int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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