Compare commits
8
Commits
5d9e36f657
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aeb79c6286 | ||
|
|
897e8d36e8 | ||
|
|
459815c0cc | ||
|
|
773c67db8f | ||
|
|
0c15159a5f | ||
|
|
19c52a9425 | ||
|
|
c9a1717e12 | ||
|
|
ca95d47dc8 |
@@ -14,10 +14,10 @@ jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: python3 --version
|
||||
- run: node --version
|
||||
- run: echo "Runner works!"
|
||||
- run: git clone --depth 1 http://abiba-bot:***REMOVED***@192.168.68.17:3000/SyslogSolution/zulip-platform-plugins.git .
|
||||
|
||||
- name: Python syntax check
|
||||
run: |
|
||||
@@ -45,8 +45,8 @@ print('✅ config.yaml.example valid')
|
||||
runs-on: ubuntu-latest
|
||||
needs: [validate]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: echo "🚀 Deploy tag $(echo $GITHUB_REF_NAME)"
|
||||
- run: git clone --depth 1 http://abiba-bot:***REMOVED***@192.168.68.17:3000/SyslogSolution/zulip-platform-plugins.git .
|
||||
|
||||
- name: Deploy to Tanko (canary)
|
||||
run: ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 jerome@192.168.68.122 "cd /root && bash -s" < scripts/deploy.sh --ct=tanko --mode=native "$GITHUB_REF_NAME" 2>&1 || echo "⚠️ Tanko deploy skipped"
|
||||
|
||||
@@ -67,6 +67,7 @@ DEFAULT_STREAM = "agent-hub"
|
||||
DEFAULT_ALL_BOTS_USER_ID = 1
|
||||
DEFAULT_POLL_INTERVAL = 3.0
|
||||
MAX_ZULIP_MESSAGE = 10000
|
||||
TRUNCATION_NOTICE = "\n\n[...truncated at Zulip limit]"
|
||||
ECHO_TAG_PREFIX = "hermes-zulip-"
|
||||
RECONNECT_BACKOFF = [2, 5, 10, 30, 60]
|
||||
DEDUP_WINDOW = 300 # 5 minutes
|
||||
@@ -120,7 +121,7 @@ def _truncate(text: str, limit: int = MAX_ZULIP_MESSAGE) -> str:
|
||||
"""Truncate to Zulip's message limit with notice."""
|
||||
if len(text) <= limit:
|
||||
return text
|
||||
return text[:limit] + "\n\n[...truncated at Zulip limit]"
|
||||
return text[:limit - len(TRUNCATION_NOTICE)] + TRUNCATION_NOTICE
|
||||
|
||||
|
||||
def _parse_zulip_timestamp(ts: Any) -> datetime:
|
||||
|
||||
Reference in New Issue
Block a user