Permalink
Cannot retrieve contributors at this time
Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up
Fetching contributors…
| from __future__ import absolute_import | |
| from eventhandler import EventHandler | |
| unsafe_warning_msg = ('These commits modify **unsafe code**. ' | |
| 'Please review it carefully!') | |
| class UnsafeHandler(EventHandler): | |
| def on_pr_opened(self, api, payload): | |
| for line in api.get_added_lines(): | |
| if line.find('unsafe ') > -1: | |
| self.warn(unsafe_warning_msg) | |
| return | |
| handler_interface = UnsafeHandler |