Triggering the VersionEye APIby Sebastien Mirolo on Wed, 30 Jul 2014
Today we are going to mechanically upload DjaoDjin's requirements file to VersionEye through a git post-update hook.
VersionEye is awesome! They keep crawling the web for new versions of you favorite libraries and send you an email if any new version is available. You also get to see the licenses of all the libraries a project depends on a separate tab - pretty useful added feature.
If you have a repository on github (public or private), you only need to create a project on VersionEye and enter the URL to the requirements file. VersionEye will keep in sync with the updates you push.
Here we prefer to host the git repositories on our own servers, even if only to run pylint on a git pre-receive hook. We thus need a way to trigger an upload of changes to VersionEye. Ask and you will be served, VersionEye provides API end points for almost everything available through the web interface. We add the following commands in .git/hooks/post-update
$ curl https://www.versioneye.com/api/v2/projects/project1_id?api_key=api_key -F email@example.com $ curl https://www.versioneye.com/api/v2/projects/project2_id?api_key=api_key -F firstname.lastname@example.org