afragen/github-updater — pull request #13 by GaryJones (2013-09-07 21:48:04+00:00)
Title: Add GitHub Branch feature, fixes #9

A bug existed where the zip would always pull from the `master` branch, but the API call to get the remote version number would look at the branch set as the default within GitHub. In a git-flow setup, this is not going to be `master`, but `develop`. That could mean that `develop` could be working on v2.0.0-alpha, suggesting an update was available, yet the download and install would still only be for v 1.0.0 instead.

The API call allows a `?ref=` query argument to be added. To set this, plugin authors can now add a "GitHub Branch" tag to their plugin. If they do, then this value is used for the API call, and the zip download URL. If they don't, then nothing is added to the URL when grabbing the remote info, but the data retrieved from the remote info has a "url" value which is parsed to determine what the default branch is, and therefore what the zip download URL should be.

Fixes #9