Documentation
¶
Overview ¶
Package scorecard handles sharing a Scorecard githubrepo client across multiple Allstar policies. The Allstar policy interface does not handle passing a reference to this, so we will store a master state here and look it up each time. We don't want to keep the tarball around forever, or we will run out of disk space. This is intended to be setup once for a repo, then all policies run, then closed for that repo.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ScClient ¶
type ScClient struct {
ScRepo clients.Repo
ScRepoClient clients.RepoClient
// contains filtered or unexported fields
}
Type ScClient is returned from Get. It contains the clients needed to call scorecard checks.
func Get ¶
Function Get will get the scorecard clients and create them if they don't exist. The github repo is initialized, which means the tarball is downloaded. If local is set, a local copy of the repo will be used instead, this allows for branch changes without another scorecard repo download.
func (ScClient) FetchBranches ¶
Fetch branches from the local repo (used for workflow rule checking).
func (ScClient) GetDefaultBranchName ¶
Fetch default branch name from repo.
func (ScClient) SwitchLocalBranch ¶
Switch the local repo between branches.