I'd like to trigger builds based on whether or not my repository has changed. I was wondering if there were something like
https://github.com/my/repository/branch/master/HEAD
which would show just the sha1 of master's most recent commit.
请参阅https://api.github.com/repos/flevour/symfony/branches/master,解析 json 并检查 sha 属性。一般来说,http://developer.github.com/v3/repos/#get-branch
与其轮询某些提要,不如使用服务挂钩向您的服务器/任何服务器发送请求,以便在您的存储库更新时执行 <anything> 。
你也许可以解析 RSS 提要
https://github.com/<username>/<repo>/commits/master.atom