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.