install_bitbucket() fails for privately hosted bitbucket server repositories.
Currently, the code fails when trying to find the DESCRIPTION file because the URLs built does not jibe with how privately hosted bitbucket servers (specifically Atlassian) create their URLs. Of course, this is only the first place where the URL fails. There will be others.
Those look like
https://<host name>/projects/<project name>/repos/<repo name>/raw/<file name>?at=refs%2Fheads%2F<branch name>
The full grammar of these links is obviously broader than the above, which is just an example.
Although it is possible to write code to build those URLs, and perhaps I may make a go at it, I wanted to formally submit the issue first.
There is also a hardcoded "src" in the URL creation code, which tells me it is hard-wired for bitbucket cloud server repositories.
My request is to provide an interface to R source repositories located on privately hosted bitbucket servers, or make me aware of existing capability to do same.
(I believe I am using the latest stable version of devtools, as I installed the package a week ago from CRAN). I am going to pull the latest version from here and double check the issue. If it has gone away, I'll withdraw this request.
It's still there. AT this point, I have fulfilled my obligation to check the existence of the issue in the latest build. Upon further digging, it is my opinion that the issue is likely in the package remotes and not here. But insofar as it surfaces here, I'll leave it for now.
@jimhester I am working on some updates to remotes to get this working with Bitbucket Server (BBS). Would you be open to reviewing a PR?
The changes you introduced in #135 don't handle BBS which has a different API to the public Bitbucket Cloud service (probably because BBS started as Stash and was bought in by Atlassian).
I started working on this a few years back as part of PR #81. But am keen to see whether this is something you would be keen to review? Would it be safe to assume same level of docs / tests as say gitlab or bitbucket (cloud)? You can see current interface / approach in this diff of remotes@master vs my fork's feature branch.
My main concern is we will have no real way to maintain it without setting up Bitbucket Server ourselves. So it might be better off in a separate package...
Hello I am also having this issue on BBS as well. One easy fix (hopefully) would be to introduce a parameter that allows the user to specify the full URL to the repository instead of constructing the URL from the variables host, repo, ref and subdir. If a optional parameter full_url could be added that if used will use the value passed along to it and ignore host, repo, ref and subdir.
This doesn't work. The BBS API is very different to the Bitbucket Cloud interface.
Thank you, @imanuelcostigan. If that idea will not work then I would like to also formally request that a new function, install_ABBS() be added introduced that allows the remotes package to install from Alassian BitBucket Server.
@jimhester - looks like you can bootstrap a local version of BBS using an official docker image. Thoughts on this?