Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: sql review comment (#13363)

ecmadaoe164ef3f45f5
diff --git a/backend/api/gitops/webhook.go b/backend/api/gitops/webhook.go
index 1c159a6b9c..4e5cde2437 100644
--- a/backend/api/gitops/webhook.go
+++ b/backend/api/gitops/webhook.go
@@ -181,7 +181,9 @@ func (s *Service) RegisterWebhookRoutes(g *echo.Group) {
if err != nil {
return c.String(http.StatusOK, fmt.Sprintf("failed to exec sql review for pull request %s, error %v", prInfo.url, err))
}
- comment = fmt.Sprintf("%s\n\n---\n\nClick [here](%s) to check the SQL review config", comment, fmt.Sprintf("%s/sql-review", setting.ExternalUrl))
+ if comment != "" {
+ comment = fmt.Sprintf("%s\n\n---\n\nClick [here](%s) to check the SQL review config", comment, fmt.Sprintf("%s/sql-review", setting.ExternalUrl))
+ }
commentPrefix = commentPrefixSQLReview
default:
}