(self, name, handler, token=None)
| 219 | class CommentBot: |
| 220 | |
| 221 | def __init__(self, name, handler, token=None): |
| 222 | # TODO(kszucs): validate |
| 223 | assert isinstance(name, str) |
| 224 | assert callable(handler) |
| 225 | self.name = name |
| 226 | self.handler = handler |
| 227 | kwargs = {} |
| 228 | if token is not None: |
| 229 | kwargs["auth"] = github.Auth.Token(token) |
| 230 | self.github = github.Github(**kwargs) |
| 231 | |
| 232 | def parse_command(self, payload): |
| 233 | mention = f'@{self.name}' |
nothing calls this directly
no outgoing calls
no test coverage detected