comparison sat/plugins/plugin_misc_merge_requests.py @ 3040:fee60f17ebac

jp: jp asyncio port: /!\ this commit is huge. Jp is temporarily not working with `dbus` bridge /!\ This patch implements the port of jp to asyncio, so it is now correctly using the bridge asynchronously, and it can be used with bridges like `pb`. This also simplify the code, notably for things which were previously implemented with many callbacks (like pagination with RSM). During the process, some behaviours have been modified/fixed, in jp and backends, check diff for details.
author Goffi <goffi@goffi.org>
date Wed, 25 Sep 2019 08:56:41 +0200
parents ab2696e34d29
children 9d0df638c8b4
comparison
equal deleted inserted replaced
3039:a1bc34f90fa5 3040:fee60f17ebac
104 """register an merge request handler 104 """register an merge request handler
105 105
106 @param name(unicode): name of the handler 106 @param name(unicode): name of the handler
107 @param handler(object): instance of the handler. 107 @param handler(object): instance of the handler.
108 It must have the following methods, which may all return a Deferred: 108 It must have the following methods, which may all return a Deferred:
109 - check(repository): True if repository can be handled 109 - check(repository)->bool: True if repository can be handled
110 - export(repository): return export data, i.e. the patches 110 - export(repository)->str: return export data, i.e. the patches
111 - parse(export_data): parse report data and return a list of dict 111 - parse(export_data): parse report data and return a list of dict
112 (1 per patch) with: 112 (1 per patch) with:
113 - title: title of the commit message (first line) 113 - title: title of the commit message (first line)
114 - body: body of the commit message 114 - body: body of the commit message
115 @aram data_types(list[unicode]): data types that his handler can generate or parse 115 @aram data_types(list[unicode]): data types that his handler can generate or parse