parse-github-url

leiningen.pom

  • (parse-github-url url)
Parses a GitHub URL returning a [username repo] pair.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source leiningen/pom.clj:42 top

(defn parse-github-url
  "Parses a GitHub URL returning a [username repo] pair."
  [url]
  (when url
    (next
     (or
      (re-matches #"(?:git@)?github.com:([^/]+)/([^/]+).git" url)
      (re-matches #"[^:]+://(?:git@)?github.com/([^/]+)/([^/]+).git" url)))))
Vars in leiningen.pom/parse-github-url: defn next or re-matches when
Used in 0 other vars

Comments top

No comments for parse-github-url. Log in to add a comment.