I want to integrate github with a external service. In particular I want certain actions to happen when an issue closes or a milestone is completed. I can see how to do the above for issues by adding a webhook against the issue event updates http://developer.github.com/v3/repos/hooks/. However, I don't see any events around milestones.
Why is that? Is it an ommission? I have seen some integrations of github milestones with the google calendar - I am assuming that this requires webhooks (I wouldn't expect them to use polling against the milestone api).
One alternative I have thought if there is no such event, is to listen for issue events and every time an issue closes, check whether this issue is associated with a milestone, and if it is check whether all other issues associated with that milestone are already closed and then create my own "milestone completed" event. ( I don't need milestone create events).
Any suggestions would be greatly welcomed.
Yeah, there are no milestone events at this time. Your idea using issue events and checking the milestone closed issues count is probably the way I'd do it too. Remember to use conditional GETs when fetching the milestone info in order to reduce your API quota consumption.