Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) GetInRepoConfig(identifier, baseBranch string, baseSHAGetter config.RefGetter, ...) (*config.ProwYAML, error)
- func (c *Client) GetPostsubmits(identifier, baseBranch string, baseSHAGetter config.RefGetter, ...) ([]config.Postsubmit, error)
- func (c *Client) GetPresubmits(identifier, baseBranch string, baseSHAGetter config.RefGetter, ...) ([]config.Presubmit, error)
- func (c *Client) GetProwYAML(refs *prowapi.Refs) (*config.ProwYAML, error)
- func (c *Client) Ping() error
- type Moonraker
- type ProwYAMLGetter
Constants ¶
const ( PathGetInrepoconfig = "inrepoconfig" PathPing = "ping" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) GetInRepoConfig ¶
func (c *Client) GetInRepoConfig(identifier, baseBranch string, baseSHAGetter config.RefGetter, headSHAGetters ...config.RefGetter) (*config.ProwYAML, error)
GetInRepoConfig just wraps around GetProwYAML(), converting the input parameters into a prowapi.Refs{} type.
Importantly, it also does defaulting of the retrieved jobs. Defaulting is required because the Presubmit and Postsubmit job types have private fields in them that would not be serialized into JSON when sent over from the server. So the defaulting has to be done client-side.
func (*Client) GetPostsubmits ¶
func (*Client) GetPresubmits ¶
func (*Client) GetProwYAML ¶
GetProwYAML returns the inrepoconfig contents for a repo, based on the Refs struct as the input. From the Refs, Moonraker can determine the org/repo, BaseSHA, and the Pulls[] (additional refs of each PR, if any) to grab the inrepoconfig contents.
type Moonraker ¶
type Moonraker struct { ConfigAgent *config.Agent InRepoConfigCache *config.InRepoConfigCache }
func (*Moonraker) RunConfigWatcher ¶
func (*Moonraker) ServeGetInrepoconfig ¶
func (mr *Moonraker) ServeGetInrepoconfig(w http.ResponseWriter, r *http.Request)
serveGetInrepoconfig returns a ProwYAML object marshaled into JSON.