use github-url-from-username-repo module

remove duplicated code as we need this functionality in
npm and npm-www