MCPcopy Create free account
hub / github.com/github/gh-aw / isPolicyCheck

Function isPolicyCheck

pkg/cli/checks_command.go:310–318  ·  view source on GitHub ↗

isPolicyCheck returns true if the check run name looks like a policy/account-gate check.

(name string)

Source from the content-addressed store, hash-verified

308
309// isPolicyCheck returns true if the check run name looks like a policy/account-gate check.
310func isPolicyCheck(name string) bool {
311 lower := strings.ToLower(name)
312 for _, pattern := range policyCheckPatterns {
313 if strings.Contains(lower, pattern) {
314 return true
315 }
316 }
317 return false
318}
319
320// filterCommitStatusesToPolicyChecks returns only the commit statuses whose context matches a policy/account-gate
321// pattern. Used to compute required_state, which excludes optional third-party commit statuses

Callers 3

classifyCheckStateFunction · 0.85
TestIsPolicyCheckFunction · 0.85

Calls 1

ToLowerMethod · 0.80

Tested by 1

TestIsPolicyCheckFunction · 0.68