Example #1
0
def setup_tests():
    (modules, handlers) = eventhandler.get_handlers()
    tests = []
    for module, handler in zip(modules, handlers):
        for test in register_tests(module[1]):
            tests.append((handler, test))
    return tests
Example #2
0
def setup_tests():
    import eventhandler
    (modules, handlers) = eventhandler.get_handlers()
    tests = []
    for module, handler in zip(modules, handlers):
        tests.extend(handler.register_tests(module[1]))
    return tests
Example #3
0
File: test.py Project: zwn/highfive
def setup_tests():
    import eventhandler
    (modules, handlers) = eventhandler.get_handlers()
    tests = []
    for module, handler in zip(modules, handlers):
        tests.extend(handler.register_tests(module[1]))
    return tests
Example #4
0
def handle_payload(api, payload):
    (modules, handlers) = eventhandler.get_handlers()
    for handler in handlers:
        handler.handle_payload(api, payload)
    warnings = eventhandler.get_warnings()
    if warnings:
        api.post_comment(warning_summary % '\n'.join(map(lambda x: '* ' + x, warnings)))
Example #5
0
def handle_payload(api, payload):
    (modules, handlers) = eventhandler.get_handlers()
    for handler in handlers:
        handler.handle_payload(api, payload)
    warnings = eventhandler.get_warnings()
    if warnings:
        api.post_comment(warning_summary %
                         '\n'.join(map(lambda x: '* ' + x, warnings)))
Example #6
0
def handle_payload(api, payload, handlers=None):
    if not handlers:
        modules, handlers = eventhandler.get_handlers()
    for handler in handlers:
        handler.handle_payload(api, payload)
    warnings = eventhandler.get_warnings()
    if warnings:
        formatted_warnings = '\n'.join(map(lambda x: '* ' + x, warnings))
        api.post_comment(warning_summary % formatted_warnings)
Example #7
0
def handle_payload(api, payload):
    (modules, handlers) = eventhandler.get_handlers()

    if payload["action"] == "opened":
        for handler in handlers:
            handler.on_pr_opened(api, payload)
    elif payload["action"] == "synchronize":
        for handler in handlers:
            handler.on_pr_updated(api, payload)
    elif payload["action"] == "created":
        for handler in handlers:
            handler.on_new_comment(api, payload)
    else:
        pass

    warnings = eventhandler.get_warnings()
    if warnings:
        api.post_comment(warning_summary % '\n'.join(map(lambda x: '* ' + x, warnings)))