Documentation ¶
Index ¶
- func RunOrSkipRequested(c Client, pr *github.PullRequest, requestedJobs []config.Presubmit, ...) error
- func TrustedPullRequest(ghc githubClient, trigger *plugins.Trigger, author, org, repo string, num int, ...) ([]github.Label, bool, error)
- func TrustedUser(ghc trustedUserClient, trigger *plugins.Trigger, user, org, repo string) (bool, error)
- type Client
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