diff options
| author | 2019-01-16 22:13:38 +0000 | |
|---|---|---|
| committer | 2019-01-16 22:13:38 +0000 | |
| commit | f50f2a6d51b7f899bb99fb3abc2338a0b33f3aed (patch) | |
| tree | 282883df03d6edb72f45de3b67b288daafd3036d /modules/github.py | |
| parent | Support github events only related to an organisation, not a repo (github.py) (diff) | |
| signature | ||
Support organisation membership event (github.py)
Diffstat (limited to 'modules/github.py')
| -rw-r--r-- | modules/github.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/github.py b/modules/github.py index cb7acc3d..e21d4a52 100644 --- a/modules/github.py +++ b/modules/github.py @@ -185,6 +185,8 @@ class Module(ModuleManager.BaseModule): outputs = self.fork(event, full_name, data) elif github_event == "ping": outputs = self.ping(event, full_name, data) + elif github_event == "membership": + outputs = self.membership(event, organisation, data) if outputs: for server, channel in targets: @@ -390,3 +392,8 @@ class Module(ModuleManager.BaseModule): url = self._short_url(data["forkee"]["html_url"]) return ["%s forked into %s - %s" % (forker, fork_full_name, url)] + + def membership(self, event, organisation, data): + return ["%s %s %s to team %s" % + (data["action"], data["sender"]["login"], data["member"]["login"], + data["team"]["name"])] |
