Returns whether the author of the action is a committer or not. If the list of committer usernames is not available it will use the author_association as a fallback mechanism.
(self, action)
| 127 | return self.github.get_repo(self.event_payload['repository']['id'], lazy=True) |
| 128 | |
| 129 | def is_committer(self, action): |
| 130 | """ |
| 131 | Returns whether the author of the action is a committer or not. |
| 132 | If the list of committer usernames is not available it will use the |
| 133 | author_association as a fallback mechanism. |
| 134 | """ |
| 135 | if self.committers: |
| 136 | return (self.event_payload[action]['user']['login'] in |
| 137 | self.committers) |
| 138 | return (self.event_payload[action]['author_association'] in |
| 139 | COMMITTER_ROLES) |
| 140 | |
| 141 | def handle(self): |
| 142 | current_state = None |