WIP: Pkg integration with the GitHub API

This tight integration with GitHub should really be undone again at some point in the future, factoring it out and making it possible to integrate with other services, but in the mean time, getting it working with one is tricky enough.