plug.github

class immp.plug.github.GitHubUser(id_=None, plug=None, *, username=None, real_name=None, avatar=None, link=None, suggested=False, raw=None)

Bases: immp.core.message.User

User present in GitHub.

class immp.plug.github.GitHubMessage(*, text=None, user=None, edited=False, action=False, reply_to=None, joined=None, left=None, title=None, attachments=None, raw=None)

Bases: immp.core.message.Message

Repository event originating from GitHub.

classmethod from_event(github, type_, id_, event)

Convert a GitHub webhook payload to a Message.

Parameters
  • github (GitHubPlug) – Related plug instance that provides the event.
  • type (str) – Event type name from the X-GitHub-Event header.
  • id (str) – GUID of the event delivery from the X-GitHub-Delivery header.
  • event (dict) – GitHub webhook payload.
Returns

Parsed message object.

Return type

GitHubMessage

class immp.plug.github.GitHubPlug(name, config, host)

Bases: immp.core.plug.Plug

Plug for incoming GitHub notifications.