1

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.

4

3 回答 3

2

请参阅https://api.github.com/repos/flevour/symfony/branches/master,解析 json 并检查 sha 属性。一般来说,http://developer.github.com/v3/repos/#get-branch

于 2012-10-17T07:59:52.887 回答
1

使用服务挂钩

与其轮询某些提要,不如使用服务挂钩向您的服务器/任何服务器发送请求,以便在您的存储库更新时执行 <anything> 。

于 2012-10-17T08:01:38.117 回答
0

你也许可以解析 RSS 提要

https://github.com/<username>/<repo>/commits/master.atom
于 2012-10-17T07:45:48.027 回答