trigger

package
v0.0.0-...-97238d6 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunOrSkipRequested

func RunOrSkipRequested(c Client, pr *github.PullRequest, requestedJobs []config.Presubmit, forceRunContexts map[string]bool, body, eventGUID string) error

RunOrSkipRequested evaluates requestJobs to determine which config.Presubmits to run and which ones to skip and once execute the ones that should be ran.

func TrustedPullRequest

func TrustedPullRequest(ghc githubClient, trigger *plugins.Trigger, author, org, repo string, num int, l []github.Label) ([]github.Label, bool, error)

TrustedPullRequest returns whether or not the given PR should be tested. It first checks if the author is in the org, then looks for "ok-to-test" label.

func TrustedUser

func TrustedUser(ghc trustedUserClient, trigger *plugins.Trigger, user, org, repo string) (bool, error)

TrustedUser returns true if user is trusted in repo.

Trusted users are either repo collaborators, org members or trusted org members. Whether repo collaborators and/or a second org is trusted is configured by trigger.

Types

type Client

type Client struct {
	GitHubClient githubClient
	KubeClient   kubeClient
	Config       *config.Config
	Logger       *logrus.Entry
}

Client holds the necessary structures to work with prow via logging, github, kubernetes and its configuration.

TODO(fejta): consider exporting an interface rather than a struct

Jump to

Keyboard shortcuts

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