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

Function isLabelValidationError

pkg/cli/org_issue_pr_helpers.go:124–134  ·  view source on GitHub ↗
(output []byte, err error)

Source from the content-addressed store, hash-verified

122}
123
124func isLabelValidationError(output []byte, err error) bool {
125 if err == nil {
126 return false
127 }
128 errText := strings.ToLower(err.Error())
129 outText := strings.ToLower(string(output))
130 has422 := strings.Contains(errText, "http 422") || strings.Contains(outText, "http 422")
131 hasValidationFailure := strings.Contains(errText, "validation failed") || strings.Contains(outText, "validation failed")
132 return has422 && hasValidationFailure &&
133 (strings.Contains(errText, "label") || strings.Contains(outText, "label"))
134}
135
136// closeExistingOrgIssuesByMarker finds all open issues in repo whose body contains
137// the given marker prefix string and closes them as not_planned. Errors are

Callers 1

createOrgIssueFunction · 0.85

Calls 2

ToLowerMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected