This commit is contained in:
pavel 2026-05-15 17:40:09 +02:00
commit 07522043b4
16 changed files with 870 additions and 38 deletions

View file

@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os/exec"
"regexp"
"strconv"
@ -47,11 +48,11 @@ func mustJSONPretty(data any) string {
return string(b)
}
func (a *App) deployWebhookURL(projectID int64, token string) string {
if token == "" {
func (a *App) deployWebhookURL(projectID int64, token, userToken string) string {
if token == "" || userToken == "" {
return ""
}
path := fmt.Sprintf("/api/webhooks/deploy/%d/%s", projectID, token)
path := fmt.Sprintf("/api/webhooks/deploy/%d/%s?ut=%s", projectID, token, url.QueryEscape(userToken))
if a.cfg.WebhookBaseURL != "" {
return a.cfg.WebhookBaseURL + path
}