circleci
circleci copied to clipboard
Add Bitbucket support
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
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) { ... });