editor icon indicating copy to clipboard operation
editor copied to clipboard

When creating a feature branch if there is another branch that begins with the same name errors occur

Open STRd6 opened this issue 12 years ago • 0 comments

In the github api if you have two branches where one begins with a subset it returns an array rather than an object.

Ex:

GET https://api.github.com/repos/STRd6/editor/git/refs/heads/e

Returns an array of all branches that begin with e rather than 404 for branch e not being found.

We can mitigate this by deleting our unused branches on Github.

The correct fix is to check if we received an array instead of an object and if so examine each object in the array to find an exact name match.

STRd6 avatar Sep 20 '13 01:09 STRd6