diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2022-05-04 15:31:11 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2022-05-04 15:31:11 +0200 |
commit | fadd1eab07c9dfe317dfc31efa8ea254a78c3eeb (patch) | |
tree | 96f816efd151fd2b132add45a000bf0a7259e613 /labbot/addons | |
parent | 1ec64ccb178a4164ac204925c20c559d96508a9b (diff) | |
download | lab-bot-fadd1eab07c9dfe317dfc31efa8ea254a78c3eeb.tar.gz lab-bot-fadd1eab07c9dfe317dfc31efa8ea254a78c3eeb.zip |
improve typing, disable non-critical logging for aiohttp, […]
- correctly popped values from kwargs to pass over to gidgetlab
- add merge hook registration method to simplify future additions
- add new setups values to config
- add print option to config
Diffstat (limited to 'labbot/addons')
-rw-r--r-- | labbot/addons/approve-merge.py | 2 | ||||
-rw-r--r-- | labbot/addons/merge-label.py | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/labbot/addons/approve-merge.py b/labbot/addons/approve-merge.py index 3c0ef30..81ea68d 100644 --- a/labbot/addons/approve-merge.py +++ b/labbot/addons/approve-merge.py @@ -32,5 +32,5 @@ async def merge_label_hook(event, gl, *args, **kwargs): log.debug(f"Cannot merge !{iid} because of its merge_statuc `{merge_status}`") def setup(bot): - bot.register(merge_label_hook, "Merge Request Hook") + bot.register_merge_hook(merge_label_hook) pass
\ No newline at end of file diff --git a/labbot/addons/merge-label.py b/labbot/addons/merge-label.py index 4798d4a..cf7bf82 100644 --- a/labbot/addons/merge-label.py +++ b/labbot/addons/merge-label.py @@ -77,6 +77,5 @@ async def merge_label_hook(event, gl, *args, **kwargs): # unknown state pass -def setup(bot): - bot.register(merge_label_hook, "Merge Request Hook") - pass
\ No newline at end of file +def setup(bot) -> None: + bot.register_merge_hook(merge_label_hook) |