jira: Allow overriding https.

This commit is contained in:
pemontto 2020-04-27 15:03:14 +01:00 committed by Tim Abbott
parent ae8a3516fb
commit 3ca336246d

View file

@ -127,7 +127,12 @@ class JiraHandler:
raise KeyError('No `domain` was specified') raise KeyError('No `domain` was specified')
self.auth = make_jira_auth(username, password) self.auth = make_jira_auth(username, password)
self.domain_with_protocol = 'https://' + domain
# Allow users to override the HTTP scheme
if re.match(r'^https?://', domain, re.IGNORECASE):
self.domain_with_protocol = domain
else:
self.domain_with_protocol = 'https://' + domain
def handle_message(self, message: Dict[str, str], bot_handler: Any) -> None: def handle_message(self, message: Dict[str, str], bot_handler: Any) -> None:
content = message.get('content') content = message.get('content')