Skip to content

Commit

Permalink
fix(notifications): support gitlab nested projects for FullNameByRepoURL
Browse files Browse the repository at this point in the history
Signed-off-by: Zadkiel Aharonian <[email protected]>
  • Loading branch information
aslafy-z authored Nov 3, 2023
1 parent a01a4b9 commit c6db186
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions util/notification/expression/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import (
"encoding/json"
"errors"
"regexp"
"strings"

service "github.com/argoproj/argo-cd/v2/util/notification/argocd"

"github.com/argoproj/argo-cd/v2/util/notification/expression/shared"

"github.com/argoproj/notifications-engine/pkg/util/text"
giturls "github.com/whilp/git-urls"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"

Expand Down Expand Up @@ -69,9 +67,6 @@ func FullNameByRepoURL(rawURL string) string {
}

path := gitSuffix.ReplaceAllString(parsed.Path, "")
if pathParts := text.SplitRemoveEmpty(path, "/"); len(pathParts) >= 2 {
return strings.Join(pathParts[:2], "/")
}

return path
}
Expand Down

0 comments on commit c6db186

Please sign in to comment.