(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)))))
Comments top
No comments for parse-github-url. Log in to add a comment.