A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/ossf/allstar/pkg/policies/branch below:

branch package - github.com/ossf/allstar/pkg/policies/branch - Go Packages

Package branch implements the Branch Protection security policy.

This section is empty.

This section is empty.

NewBranch returns a new BranchProtection policy.

Branch is the Branch Protection policy object, implements policydef.Policy.

Check performs the policy check for Branch Protection based on the configuration stored in the org/repo, implementing policydef.Policy.Check().

Fix implementing policydef.Policy.Fix().

GetAction returns the configured action from Branch Protection's configuration stored in the org-level repo, default log. Implementing policydef.Policy.GetAction().

Check whether this policy is enabled or not.

Name returns the name of this policy, implementing policydef.Policy.Name().

type OrgConfig struct {
	
	
	OptConfig config.OrgOptConfig `json:"optConfig"`

	
	Action string `json:"action"`

	
	
	EnforceDefault bool `json:"enforceDefault"`

	
	
	
	EnforceBranches map[string][]string `json:"enforceBranches"`

	
	
	RequireApproval bool `json:"requireApproval"`

	
	
	RequireCodeOwnerReviews bool `json:"requireCodeOwnerReviews"`

	
	ApprovalCount int `json:"approvalCount"`

	
	
	DismissStale bool `json:"dismissStale"`

	
	BlockForce bool `json:"blockForce"`

	
	
	
	RequireUpToDateBranch bool `json:"requireUpToDateBranch"`

	
	
	
	RequireStatusChecks []StatusCheck `json:"requireStatusChecks"`

	
	
	EnforceOnAdmins bool `json:"enforceOnAdmins"`

	
	RequireSignedCommits bool `json:"requireSignedCommits"`
}

OrgConfig is the org-level config definition for Branch Protection.

type RepoConfig struct {
	
	OptConfig config.RepoOptConfig `json:"optConfig"`

	
	Action *string `json:"action"`

	
	EnforceDefault *bool `json:"enforceDefault"`

	
	
	EnforceBranches []string `json:"enforceBranches"`

	
	RequireApproval *bool `json:"requireApproval"`

	
	RequireCodeOwnerReviews *bool `json:"requireCodeOwnerReviews"`

	
	ApprovalCount *int `json:"approvalCount"`

	
	DismissStale *bool `json:"dismissStale"`

	
	BlockForce *bool `json:"blockForce"`

	
	EnforceOnAdmins *bool `json:"enforceOnAdmins"`

	
	
	RequireUpToDateBranch *bool `json:"requireUpToDateBranch"`

	
	
	
	
	RequireStatusChecks []StatusCheck `json:"requireStatusChecks"`

	
	
	RequireSignedCommits *bool `json:"requireSignedCommits"`
}

RepoConfig is the repo-level config for Branch Protection.

type StatusCheck struct {
	
	Context string `json:"context"`

	
	
	
	AppID *int64 `json:"appID"`
}

StatusCheck is the config description for specifying a single required status check in the RequireStatusChecks list.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4