code: private static String normalize(String url) {
          if (StringUtils.isBlank(url)) {
              return null;
          }
          // Strip "/tree/..."
          if (url.contains("/tree/")) {
              url = url.replaceFirst("/tree/.*$", "");
          }
          if (!url.endsWith("/")) {
              url += '/';
          }
          return url;
      }
docs: Normalizes the github URL.
  <p>
  Removes unwanted path elements (e.g. <code>tree/master</code>).
  
  @return URL to the project or null if input is invalid.