Quantcast
Channel: Planet Plone - Where Developers And Integrators Write
Viewing all articles
Browse latest Browse all 3535

4teamwork: TooManyRepositories - Manage your GitHub Subscriptions!

$
0
0

If you are a member of collective organisation on GitHub you know the pain: getting lots of GitHub emails for repositories you don’t care about.

The collective organisation on GitHub currently has 909 repositories, the Plone organisation has 228 – together, that’s over a thousand repositories. That’s a lot of emails!

GitHub changed the watching feature last year, which makes it a little bit better. But still, the problems when participating in hundreds of repositories are not solved for me.

There are various solutions for the problem, like using Gmail filters or clicking through the Watched Repositories view on GitHub – but who wants to unwatch a thousand repositories? Disabling automatically watch is also no option for me – I really want to know what’s going on in my employer’s organisation and the option cannot be configured per organisation.

That’s why I wrote github-watchlist, a small script for mass subscribing and unsubscribing repositories using regular expressions.

The Python script let’s you configure your subscriptions with a regular expression pipeline and automatically subscribes or unsubscribes the repositories for you.

My configuration looks like this (short version):

123456789101112
watchlist=    watching:      4teamwork/.*    watching:      jone/.*    watching:      collective/collective.dexteritytextindexer    watching:      collective/collective.elephantvocabulary    watching:      collective/collective.i18nreport    watching:      collective/collective.js.jqtooltip    watching:      collective/collective.jsonmigrator    watching:      collective/collective.mtrsetup    watching:      collective/collective.z3cinspector    watching:      collective/mrsd.el    not-watching:  collective/.*

The list of expressions is applied top-down on most repositories I have access to and it does what you think it does :–)

After installing and configuring the github-watchlist you can simply run the update script.

123456789101112131415161718
$ ./bin/update-watchlist
NO SUBSCRIPTION CHANGES:
 - keep not watching: collective/ArchGenXML
 - keep watching: jone/github-watchlist
SUBSCRIPTION CHANGES:
 - add subscription: 4teamwork/ftw.lawgiver
 - remove subscription: collective/collective.dancing
SUMMARY:
 - Keep watching: 1
 - Keep not watching: 1
 - Start watching: 1
 - Stop watching: 1
Continue updating subscriptions? [Yes/No]: yes
INFO create subscription: 4teamwork/ftw.lawgiver
INFO delete subscription: plone/collective.dancing

As the script is idempotent we can run it periodically with a cronjob:

1
0 0 * * *   /Users/jone/github-watchlist/bin/update-watchlist --confirmed

See the github-watchlist readme for more details and have fun with it. Give me some feedback if you use it!


Viewing all articles
Browse latest Browse all 3535

Trending Articles