circleci icon indicating copy to clipboard operation
circleci copied to clipboard

Add Bitbucket support

Open jihonrado opened this issue 7 years ago • 1 comments

This library works only with Github with the current implementation, as it uses URLs like this:

https://circleci.com/api/v1.1/project/:username/:project/tree/:branch

Following the documentation, the VCS can be specified by using URLs like:

https://circleci.com/api/v1.1/project/:vcs-type/:username/:project/tree/:branch

Not providing the vcs-type path parameter makes CircleCI consider github as VCS.

A way to fix this would be to add the vcs-type config value and using it in the functions where it is needed.

/cc @jpstevens

jihonrado avatar Mar 17 '17 11:03 jihonrado

Hi @jihonrado, I like the idea, but would have to make sure it's backwards compatible.

Did you have something like the following in mind:

ci.getBuilds({ username: "username", project: "product", vcsType: "github", branch: "master" })
.then(function (builds) { ... });

jpstevens avatar Mar 29 '17 10:03 jpstevens