Reputation:
I would like to forward (or better said, mirror) github issues (of an Open Source project) to the project's public mailing list.
How can I do it?
Are there any existing solutions using github's API?
(Service hooks in repository settings only forward commits, not issues.)
Upvotes: 5
Views: 816
Reputation: 28835
You can iterate over a repository's issues events and store the last ETag header you're sent to then only get recent events. By doing so you can catch new issues, new comments on issues and how the state of those issues. The endpoint is described here and the data you'll receive is described here.
This of course requires you pinging the API every so often but with an anonymous ratelimit of 60 requests per hour (and an authenticated ratelimit of 5000 per hour) you could at least have emails that are accurate to within a minute of something transpiring (unless you're doing this for multiple repositories, in which case you'd expire your ratelimit much faster).
I don't know of any existing solutions, but one shouldn't be hard to put together.
Upvotes: 2