diff options
| author | 2019-06-28 23:16:05 +0100 | |
|---|---|---|
| committer | 2019-06-28 23:16:05 +0100 | |
| commit | ae9d099a41b703ce875cf8746a94b6995bbaedfb (patch) | |
| tree | c389ae3b967c43055a1c671b8cebf04db4e8f8b6 /modules/github.py | |
| parent | message arg for HTTPWrongContentTypeException/HTTPParsingException (diff) | |
| signature | ||
Refactor set/channelset/serverset/botset in to 'utils.Setting' objects
Diffstat (limited to 'modules/github.py')
| -rw-r--r-- | modules/github.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/modules/github.py b/modules/github.py index 102f3ab2..633f1a0a 100644 --- a/modules/github.py +++ b/modules/github.py @@ -22,15 +22,13 @@ REGEX_REF = re.compile(r"(?:\S+(?:\/\S+)?)?#\d+") API_ISSUE_URL = "https://api.github.com/repos/%s/%s/issues/%s" API_PULL_URL = "https://api.github.com/repos/%s/%s/pulls/%s" -@utils.export("channelset", {"setting": "github-default-repo", - "help": "Set the default github repo for the current channel", - "example": "jesopo/bitbot"}) -@utils.export("channelset", {"setting": "auto-github", - "help": "Enable/disable automatically getting github issue/PR info", - "validate": utils.bool_or_none, "example": "on"}) -@utils.export("channelset", {"setting": "auto-github-cooldown", - "help": "Set amount of seconds between auto-github duplicates", - "validate": utils.int_or_none, "example": "300"}) +@utils.export("channelset", utils.Setting("github-default-repo", + "Set the default github repo for the current channel", + example="jesopo/bitbot")) +@utils.export("channelset", utils.Setting("auto-github", + "Enable/disable automatically getting github issue/PR info")) +@utils.export("channelset", utils.IntSetting("auto-github-cooldown", + "Set amount of seconds between auto-github duplicates", example="300")) class Module(ModuleManager.BaseModule): def _parse_ref(self, channel, ref): repo, _, number = ref.rpartition("#") |
