- We want any github issue notification related to the libusbx github project being pushed as an e-mail to
- The default notification mechanism of github is next to useless to do anything like that, especially if you're working with a project that is associated with a github organization.
- As a result, we have created a
libusbx-develuser that, monitors the libusbx project as a pull-only participant, and that receives NewsFeed about issues among other things. This NewsFeed can then be used as RSS/Atom (
https://github.com/libusbx-devel.private.atom), and fed through
rss2emailto send e-mail notifications to the mailing list.
- However, besides report about issues, the NewsFeed also contains reports about wiki updates and whatnot, i.e. loads of polluting events that we don't want the mailing list to get notified about. And neither github or
rss2emailoffer the possibility to filter events on their own.
- A quick look at the feed with
curlindicates that RSS/Atom entries are tagged, with something like:
<id>tag:github.com,2008:IssueCommentEvent/1570141345</id>for the ones that are of interest to us, and
<id>tag:github.com,2008:GollumEvent/1570245314</id>for the ones that aren't
- Thus, if you use a dedicated copy of
rss2emailfor the github feed, it is possible to modify the
rss2email.pycode, and add a filter that ensures only entries that have an issue related tag are processed, with:
for entry in r.entries: id = getID(entry) if id[:25] != "tag:github.com,2008:Issue": continue # If TRUST_GUID isn't set, we get back hashes of the content.so that anything that isn't issue related is filtered out.
config.py, that can take wildcards, and then cross reference these in the code above, but since we don't have a all day... Bonus 1: If you need authentication with
rss2email, assuming that
libusbx-develis your user, the following is an example of the URI you should use for the RSS:
Bonus 2: In case you want to play with the github JSON API, that pertains to issues, rather than the RSS, and provide
libusbx/libusbxis your project, you can issue something like
curl -i -u libusbx-devel:PASSWORD https://api.github.com/repos/libusbx/libusbx/issues/events