-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to Embedded Ansible for ssh user@host:path urls #19129
Add support to Embedded Ansible for ssh user@host:path urls #19129
Conversation
Checked commit Fryguy@4019f7e with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment from our out of band discussion.
@@ -9,7 +9,7 @@ class GitRepository < ApplicationRecord | |||
|
|||
attr_reader :git_lock | |||
|
|||
validates :url, :format => URI.regexp(%w[http https file ssh]), :allow_nil => false | |||
validates :url, :format => Regexp.union(URI.regexp(%w[http https file ssh]), /\A[-\w:.]+@.*:/), :allow_nil => false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should our custom regexp:
/\A[-\w:.]+@.*:/
Be a constant so that we can reference it else where? For parsing out user/pass/etc. later?
Add support to Embedded Ansible for ssh user@host:path urls (cherry picked from commit 11ad9b8)
Ivanchuk backport details:
|
@carbonin @NickLaMuro Please review.
This is using the same regex that the UI uses [1], since I couldn't find a "standard" one.
[1] https://github.com/ManageIQ/manageiq-ui-classic/blob/e737cc675ee006c11508bc23f038c3357a1fb089/app/assets/javascripts/directives/url_validation.js#L21