larsxschneider / ShowInGitHub

Xcode plugin to open the GitHub page of the commit of the currently selected line in the editor window.
BSD 2-Clause "Simplified" License
239 stars 36 forks source link

support bitbucket #9

Closed payliu closed 10 years ago

payliu commented 10 years ago

Do not change any menu name, just open last commit or file at Bitbucket.org according to its repo name. issue https://github.com/larsxschneider/ShowInGitHub/issues/8.

larsxschneider commented 10 years ago

Hi @payliu !

Very nice work! Thank you very much. I made a few remarks and I am happy to merge it!

payliu commented 10 years ago

hi @larsxschneider,

I finish to modify. It will check isBitBucketRepo.

And also check github.org, github.com, bitbucket.org and bitbucket.com.

If not isGithubRepo and isBitBucketRepo, it will do nothing.

Thanks:)

larsxschneider commented 10 years ago

@payliu I merged your PR with a few modifications. I really need to support github enterprise instances (that's what I use daily) and there is no easy way to detect these kind of servers because they can have arbitrary URLs. Can you check if the bitbucket stuff still works for you? Again, thanks a lot for the PR!

payliu commented 10 years ago

@larsxschneider , no problem. :)

I'm not sure what's mean of about arbitrary URLs that you said. And I do not have that experience of github enterpise instance.

What the url you meet is git clone https://repo.company.com/John/GoodStuff.git or git clone git@repo.company.com.com:John/GoodStuff.git

And we should make ShowInGitHub to know that?

payliu commented 10 years ago

@larsxschneider, sorry late, it can work well in Bitbucket. thanks.

larsxschneider commented 10 years ago

great :smile: