Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Fix the gitlab api path to remove extra /
天舟19ecd013e048
diff --git a/backend/external/gitlab/gitlab.go b/backend/external/gitlab/gitlab.goindex ebdc381f2f..73bd2bb60e 100644--- a/backend/external/gitlab/gitlab.go+++ b/backend/external/gitlab/gitlab.go@@ -7,7 +7,7 @@ import ()const (- ApiPath = "/api/v4"+ ApiPath = "api/v4")type WebhookPut struct {@@ -15,8 +15,12 @@ type WebhookPut struct {PushEventsBranchFilter string `json:"push_events_branch_filter"`}+type WebhookPushEvent struct {+ Ref string `json:"ref"`+}+func PUT(instanceURL string, resourcePath string, token string, body io.Reader) (*http.Response, error) {- url := fmt.Sprintf("%s%s%s", instanceURL, ApiPath, resourcePath)+ url := fmt.Sprintf("%s/%s/%s", instanceURL, ApiPath, resourcePath)req, err := http.NewRequest("PUT",url, body)if err != nil {@@ -35,7 +39,7 @@ func PUT(instanceURL string, resourcePath string, token string, body io.Reader)}func DELETE(instanceURL string, resourcePath string, token string) (*http.Response, error) {- url := fmt.Sprintf("%s%s%s", instanceURL, ApiPath, resourcePath)+ url := fmt.Sprintf("%s/%s/%s", instanceURL, ApiPath, resourcePath)req, err := http.NewRequest("DELETE",url, nil)if err != nil {