gitea-sonarqube-bot/internal/actions/actions.go

23 lines
315 B
Go
Raw Normal View History

package actions
import "strings"
type BotAction string
const (
ActionReview BotAction = "/sq-bot review"
ActionPrefix string = "/sq-bot"
)
func IsValidBotComment(c string) bool {
if !strings.HasPrefix(c, ActionPrefix) {
return false
}
if c != string(ActionReview) {
return false
}
return true
}