xcode-open-on-github
xcode-open-on-github copied to clipboard
Better support for Github Enterprise
I changed the way the repository URL is constructed slightly. Saving in Automator also changed the QuickLook thumbnail (which I kept because I don't want to fight the tools) and the line endings in the script, which I'm okay with, because I think it's more readable on GitHub now.
The change was to use
sed -E -e 's,git@,https://,' -e 's,:([^/]),/\1,' -e 's,.git$,,'
rather than
sed 's/ssh:\/\/git@/https:\/\//' | sed 's/git@/https:\/\//' | sed 's/com:/com\//' | sed 's/\.git//'
I think the change to use ,
as the delimiter makes the regex easier to read (less escaping) but also, I don't assume the host name ends in com
, which is not true of one of the Github Enterprise installations that I use.