integr8ly / tutorial-web-app

Solution Explorer provides the front door into the Integreatly initiative. It hosts the various Solution Patterns, as well as providing a dashboard of installed applications/products/services.
Apache License 2.0
36 stars 54 forks source link

INTLY-3658: Regex change to support github urls without www #514

Closed mfrances17 closed 4 years ago

mfrances17 commented 4 years ago

Motivation

https://issues.jboss.org/browse/INTLY-3658 https://issues.jboss.org/browse/INTLY-2720

What

Changed the regex for the url syntax checker so that it supports github URLs with and without "www." in the address, and discovered and fixed another issue in which invalid URLs would go unflagged if there were < or > 3 w's in the address (e.g. 'ww.github.com' 'wwwwww.github.com' etc).

Why

Allows for typing or copy/pasting of completely valid github URLs that don't specify the optional www in the URL.

Verification Steps

  1. In Solution Explorer, click the Settings (gear) icon in the masthead to open the Settings page.
  2. Type in a valid github URL containing www. in the field, such as: https://www.github.com/mySolution
  3. Verify that the syntax is correctly verified as you type. It should become valid as soon as you type the m in mySolution.
  4. Cut the URL from the field and paste it back in to verify that it is still verifying as valid.
  5. Repeat the above steps with a valid github URL without a www. in the URL, such as: https://github.com/mySolution

Checklist:

Progress

Additional Notes

Screen shot before fix: settings-before

Screen shot after fix: settings-after