auth+cli
This commit is contained in:
parent
314cbd37c7
commit
07522043b4
16 changed files with 870 additions and 38 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue