datadog-api-client-ruby
datadog-api-client-ruby copied to clipboard
Url check in EntityV3DatadogCodeLocationItem broken
Describe the bug
In EntityV3DatadogCodeLocationItem there is a Regex check on the git url provided. Presently is it Regexp.new(/url/) (the letters u, r, l), so "url" or "the corner of the book is curling up" would match, but "https://github.com/myorg/myrepo" would not.
See code here.
To Reproduce
Works, but shouldn't:
DatadogAPIClient::V2::EntityV3DatadogCodeLocationItem.new(repository_url: "url")
Should work, but doesn't:
DatadogAPIClient::V2::EntityV3DatadogCodeLocationItem.new(repository_url: "https://github.com/myorg/myrepo")