events

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInFlight

func GetInFlight() int

Types

type CheckEvent

type CheckEvent struct {
	TempWorkingDir string // Location of the local repo
	// contains filtered or unexported fields
}

func NewCheckEvent

func NewCheckEvent(repo *repo.Repo, client vcs_clients.Client) *CheckEvent

func (*CheckEvent) Cleanup

func (ce *CheckEvent) Cleanup(ctx context.Context)

func (*CheckEvent) CloneRepoLocal

func (ce *CheckEvent) CloneRepoLocal(ctx context.Context) error

Take the repo inside the Check Event and try to clone it locally

func (*CheckEvent) CommitStatus

func (ce *CheckEvent) CommitStatus(ctx context.Context, status vcs_clients.CommitState)

Take one of "success", "failure", "pending" or "error" and pass off to client To set the PR/MR status

func (*CheckEvent) CreateTempDir

func (ce *CheckEvent) CreateTempDir() error

func (*CheckEvent) GenerateListOfAffectedApps

func (ce *CheckEvent) GenerateListOfAffectedApps(ctx context.Context) (map[string]string, error)

Walks the repo to find any apps or appsets impacted by the changes in the MR/PR.

func (*CheckEvent) GetListOfChangedFiles

func (ce *CheckEvent) GetListOfChangedFiles(ctx context.Context) ([]string, error)

func (*CheckEvent) GetRepo

func (ce *CheckEvent) GetRepo(ctx context.Context) (*repo.Repo, error)

Get the Repo from a CheckEvent. In normal operations a CheckEvent can only be made by the VCSHookHandler As the Repo is built from a webhook payload via the VCSClient, it should always be present. If not, error

func (*CheckEvent) InitializeGit

func (ce *CheckEvent) InitializeGit(ctx context.Context) error

Ensure we init git for this Check Event

func (*CheckEvent) MergeIntoTarget

func (ce *CheckEvent) MergeIntoTarget(ctx context.Context) error

Merge the changes from the MR/PR into the base branch

func (*CheckEvent) ProcessApps

func (ce *CheckEvent) ProcessApps(ctx context.Context)

Jump to

Keyboard shortcuts

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