Skip to content

Commit

Permalink
Merge branch 'master' into revert-347-revert-345-rego
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohd Uzair authored Aug 16, 2023
2 parents c7fd21b + 1dba678 commit 7af07e0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func ReadLocalFile(location string) (string, error) {

// Gets the latest stable release tags from github for a given org name and repo name(in that org) in sorted order
func GetLatestReleaseTagsSorted(org string, repo string) ([]string, error) {
var url string = "https://github.com/" + org + "/" + repo + "/releases"
var url string = "https://api.github.com/repos/" + org + "/" + repo + "/releases"
resp, err := http.Get(url)
if err != nil {
return nil, ErrGettingLatestReleaseTag(err)
Expand Down Expand Up @@ -236,3 +236,12 @@ func safeClose(co io.Closer) {
log.Error(cerr)
}
}

func Contains[G []K, K comparable](slice G, ele K) bool {
for _, item := range slice {
if item == ele {
return true
}
}
return false
}

0 comments on commit 7af07e0

Please sign in to comment.