From ae9d099a41b703ce875cf8746a94b6995bbaedfb Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 28 Jun 2019 23:16:05 +0100 Subject: Refactor set/channelset/serverset/botset in to 'utils.Setting' objects --- modules/git_webhooks/__init__.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'modules/git_webhooks/__init__.py') diff --git a/modules/git_webhooks/__init__.py b/modules/git_webhooks/__init__.py index b76ec4a3..a86eda68 100644 --- a/modules/git_webhooks/__init__.py +++ b/modules/git_webhooks/__init__.py @@ -13,15 +13,12 @@ DEFAULT_EVENT_CATEGORIES = [ "ping", "code", "pr", "issue", "repo" ] -@utils.export("channelset", {"setting": "git-prevent-highlight", - "help": "Enable/disable preventing highlights", - "validate": utils.bool_or_none, "example": "on"}) -@utils.export("channelset", {"setting": "git-hide-organisation", - "help": "Hide/show organisation in repository names", - "validate": utils.bool_or_none, "example": "on"}) -@utils.export("channelset", {"setting": "git-hide-prefix", - "help": "Hide/show command-like prefix on git webhook outputs", - "validate": utils.bool_or_none, "example": "on"}) +@utils.export("channelset", utils.BoolSetting("git-prevent-highlight", + "Enable/disable preventing highlights")) +@utils.export("channelset", utils.BoolSetting("git-hide-organisation", + "Hide/show organisation in repository names")) +@utils.export("channelset", utils.BoolSetting("git-hide-prefix", + "Hide/show command-like prefix on git webhook outputs")) class Module(ModuleManager.BaseModule): _name = "Webhooks" -- cgit v1.3.1-10-gc9f91