MCPcopy Create free account
hub / github.com/bytebase/bytebase / isProjectLevelEmail

Function isProjectLevelEmail

backend/common/resource_name.go:564–572  ·  view source on GitHub ↗

isProjectLevelEmail checks if the email is a project-level email.

(email, suffix string)

Source from the content-addressed store, hash-verified

562
563// isProjectLevelEmail checks if the email is a project-level email.
564func isProjectLevelEmail(email, suffix string) bool {
565 // Format: {name}@{project-id}.{suffix}
566 parts := strings.Split(email, "@")
567 if len(parts) != 2 {
568 return false
569 }
570 domain := parts[1]
571 return strings.HasSuffix(domain, fmt.Sprintf(".%s", suffix))
572}
573
574func FormatReviewConfig(id string) string {
575 return fmt.Sprintf("%s%s", ReviewConfigPrefix, id)

Callers 2

IsWorkloadIdentityEmailFunction · 0.85
IsServiceAccountEmailFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected