|
1 | 1 | import logging |
2 | | -BACKEND = 'Mattermost' |
| 2 | + |
| 3 | +BACKEND = "Mattermost" |
3 | 4 | BOT_ROOT_DIR = "/opt/errbot" |
4 | 5 | BOT_DATA_DIR = f"{BOT_ROOT_DIR}/data" |
5 | 6 | BOT_EXTRA_BACKEND_DIR = f"{BOT_ROOT_DIR}/backends/" |
6 | 7 | BOT_EXTRA_PLUGIN_DIR = f"{BOT_ROOT_DIR}/plugins/" |
7 | 8 | BOT_LOG_FILE = f"{BOT_ROOT_DIR}/log/err.log" |
8 | 9 | BOT_LOG_LEVEL = logging.DEBUG |
9 | 10 | BOT_LOG_SENTRY = False |
10 | | -SENTRY_DSN = '' |
| 11 | +SENTRY_DSN = "" |
11 | 12 | SENTRY_LOGLEVEL = 1 |
12 | 13 | BOT_ASYNC = True |
13 | 14 |
|
14 | 15 | # Mattermost |
15 | 16 | MATTERMOST = { |
16 | 17 | # Required |
17 | | - 'team': '<TEAM_NAME>', |
18 | | - 'server': '<MATTERMOST_SERVER_NAME>', |
| 18 | + "team": "<TEAM_NAME>", |
| 19 | + "server": "<MATTERMOST_SERVER_NAME>", |
19 | 20 | # For the login, either |
20 | | - 'login': '<BOT_MATTERMOST_LOGIN>', |
21 | | - 'password': '<BOT_MATTERMOST_PASSWORD>', |
| 21 | + "login": "<BOT_MATTERMOST_LOGIN>", |
| 22 | + "password": "<BOT_MATTERMOST_PASSWORD>", |
22 | 23 | # Or, if you have a personal access token |
23 | 24 | #'token': '<BOT_TOKEN>', |
24 | 25 | # Optional |
25 | | - 'insecure': False, # Default = False. Set to true for self signed certificates |
26 | | - 'scheme': 'http', # Default = https |
27 | | - 'port': 8065, # Default = 8065 |
28 | | - 'timeout': 30, # Default = 30. If the webserver disconnects idle connections later/earlier change this value |
29 | | - 'cards_hook': 'incomingWebhookId' # Needed for cards/attachments |
| 26 | + "insecure": False, # Default = False. Set to true for self signed certificates |
| 27 | + "scheme": "http", # Default = https |
| 28 | + "port": 8065, # Default = 8065 |
| 29 | + "timeout": 30, # Default = 30. If the webserver disconnects idle connections later/earlier change this value |
| 30 | + "cards_hook": "incomingWebhookId", # Needed for cards/attachments |
30 | 31 | } |
31 | | -BOT_IDENTITY=MATTERMOST |
| 32 | +BOT_IDENTITY = MATTERMOST |
32 | 33 |
|
33 | | -BOT_ADMINS = (['<MATTERMOST_NAME>']) |
34 | | -CHATROOM_PRESENCE = (["<CHAT_ROOM_NAME>"]) |
35 | | -CHATROOM_FN = '<BOT_NAME>' |
36 | | -BOT_PREFIX = '!' |
| 34 | +BOT_ADMINS = ["<MATTERMOST_NAME>"] |
| 35 | +CHATROOM_PRESENCE = ["<CHAT_ROOM_NAME>"] |
| 36 | +CHATROOM_FN = "<BOT_NAME>" |
| 37 | +BOT_PREFIX = "!" |
37 | 38 |
|
38 | 39 | DIVERT_TO_PRIVATE = () |
39 | 40 | CHATROOM_RELAY = {} |
40 | 41 | REVERSE_CHATROOM_RELAY = {} |
41 | 42 |
|
42 | 43 | # Err-StackStorm |
43 | 44 | STACKSTORM = { |
44 | | - 'auth_url': 'https://<STACKSTORM_SERVERNAME>/auth/v1', |
45 | | - 'api_url': 'https://<STACKSTORM_SERVERNAME>/api/v1', |
46 | | - 'stream_url': 'https://<STACKSTORM_SERVERNAME>/stream/v1', |
47 | | - |
48 | | - 'verify_cert': False, |
49 | | - 'secrets_store': 'cleartext', |
50 | | - 'api_auth': { |
51 | | - 'user': { |
52 | | - 'name': '<BOT_ST2_USERNAME>', |
53 | | - 'password': "<BOT_ST2_PASSWORD>", |
| 45 | + "auth_url": "https://<STACKSTORM_SERVERNAME>/auth/v1", |
| 46 | + "api_url": "https://<STACKSTORM_SERVERNAME>/api/v1", |
| 47 | + "stream_url": "https://<STACKSTORM_SERVERNAME>/stream/v1", |
| 48 | + "verify_cert": False, |
| 49 | + "secrets_store": "cleartext", |
| 50 | + "api_auth": { |
| 51 | + "user": { |
| 52 | + "name": "<BOT_ST2_USERNAME>", |
| 53 | + "password": "<BOT_ST2_PASSWORD>", |
54 | 54 | }, |
55 | 55 | }, |
56 | | - 'rbac_auth': { |
57 | | - 'standalone': {} |
58 | | - }, |
59 | | - 'timer_update': 900, # Unit: second. Bot token renewal interval. |
| 56 | + "rbac_auth": {"standalone": {}}, |
| 57 | + "timer_update": 900, # Unit: second. Bot token renewal interval. |
60 | 58 | } |
0 commit comments