go-circleci icon indicating copy to clipboard operation
go-circleci copied to clipboard

add vcs-type parameter and change to v1.1 API

Open tylux opened this issue 7 years ago • 6 comments

Version Control System (:vcs-type)

New with v1.1 of the api, for endpoints under /project you will now need to tell CircleCI what version control system type your project uses. Current choices are ‘github’ or ‘bitbucket’.

tylux avatar Nov 09 '17 23:11 tylux

👍 thanks for starting this discussion @tylux

My main hesitation with this is that it is a breaking change to API. I'll think about it a bit more, but I'm curious if there are any clever ways we could keep the current API and also add support for v1.1 absent maintaining separate branches.

The right answer may also be to just flip the switch and force people to upgrade as you've done here.

I'm not sure why CI didn't run on this PR, but the tests will need to be updated too.

jszwedko avatar Nov 13 '17 04:11 jszwedko

@jszwedko you can use gopkg.in to version library. Simply create a branch named e.g. v2, then gopkg.in/jszwedko/go-circleci.v2 will point to your repo to the v2 branch. Then, one can pull that by go get gopkg.in/jszwedko/go-circleci.v2.

kudrykv avatar Nov 16 '17 01:11 kudrykv

@jszwedko Any updates on this matter?

martinssipenko avatar May 08 '18 07:05 martinssipenko

I think your modifications break the tests @tylux You may find a fix here

tgermain avatar Dec 04 '18 15:12 tgermain

also interested in this PR

phamdt avatar Feb 12 '19 00:02 phamdt

Apologies for falling off on this one. I think v1.1 of Circle's API has been around long enough that we could make it the default, but I'd still like to provide an easy way for projects depending on the old API to continue using the client (i.e. minimize the amount of changes they'd need to make to continue relying on the library).

I think this could be possible by moving master to a v1 branch that will only get bug fixes, create a v1.1 branch pinned to v1.1 of the CircleCI API that people can pin their projects to, and have master track the latest API version.

I'll try to follow up on this soon. I think it's also an opportunity to see if we can make other backwards incompatible improvements to the API of this library.

jszwedko avatar Apr 27 '19 19:04 jszwedko