def event_fired(self, content): if content.get('action') != "opened": # we really don't care about events that are related to pull requests being opened. return num = content.get('pull_request').get('number') maintainers = get_all_maintainers(num) assign_issue(num, 'gordn') create_comment(num, 'Hey {0}, can you please take a look at this issue?', ','.join(maintainers))
def maintainers(issue): return jsonify(maintainers=get_all_maintainers(int(issue)))