-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
134 lines (119 loc) · 5.22 KB
/
Copy path.env.example
File metadata and controls
134 lines (119 loc) · 5.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Azure Bot Framework
MicrosoftAppId=
MicrosoftAppPassword=
MicrosoftAppType=MultiTenant
# Bot identity in Azure AD — used by probeChannel() during channel sync,
# and by the constructed-convref fallback when the bot has never seen
# an inbound activity in a target channel. Find both in the Azure
# portal under your Bot's Identity blade (Managed Identity or App
# Registration → Enterprise applications).
# BOT_AAD_OBJECT_ID = Object ID of the bot's service principal
# BOT_TENANT_ID = Directory (tenant) ID where the bot is registered
# Both fall back to the literal string 'unknown' when omitted, which
# works in many tenants but not all.
BOT_AAD_OBJECT_ID=
BOT_TENANT_ID=
# MySQL
MYSQL_HOST=
MYSQL_USER=
MYSQL_PASS=
MYSQL_DB=
# Redis (optional — defaults to 67.217.60.234:6379)
REDIS_HOST=
REDIS_PORT=6379
# Bot Redis authentication (optional)
REDIS_USER=
REDIS_PASSWORD=
# Notification queue Redis (optional — defaults to 67.217.60.234:6379)
REDIS_HOST_MY=
REDIS_PORT_MY=6379
# Teams service URL — change for GCC/GCC High deployments
# Default: https://smba.trafficmanager.net/teams/
TEAMS_SERVICE_URL=
# MongoDB / ZoneMTA
ZONEMTA_USERNAME=
ZONEMTA_PASSWORD=
ZONEMTA_HOST=
# OAuth (used by dialogs, optional)
connectionName=
# Ticket API (optional — defaults to mystage.interserver.net)
TICKET_API_URL=
# Ticket reply API (optional — defaults to mystage.interserver.net/admin/ajax/post_ticket.php)
TICKET_POST_API_URL=
# Daily Recap card endpoint on MyAdmin (template + data fetch)
DAILY_RECAP_URL=https://mystage.interserver.net/admin/ajax/daily_recap_card_api.php
# Shared secret — must match DAILY_RECAP_TOKEN on the MyAdmin server
DAILY_RECAP_TOKEN=
# GitHub API (used by issues/labels commands)
GITHUB_TOKEN=
GITHUB_OWNER=interserver
GITHUB_REPO=my
# Server
PORT=3978
# Rate limiting (optional — defaults shown)
# General /api limit: 60 req/min per IP
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX=60
# Stricter limit for proactive-send endpoints (/api/message, /api/dailyrecap): 30 req/min per IP+channel
RATE_LIMIT_SEND_WINDOW_MS=60000
RATE_LIMIT_SEND_MAX=30
# Channel sync on startup
# When 1, the bot probes every channel listed in server/queue/channels.js with
# an invisible message and immediately deletes it — this registers the
# bot's presence in channels it has never received an inbound activity in,
# so proactive sends land via stored convrefs instead of constructed ones.
# Requires BOT_AAD_OBJECT_ID and BOT_TENANT_ID above for reliable auth.
CHANNEL_SYNC_ENABLED=0
# Notification queue tuning (all optional — defaults shown)
# Toggle the consumer entirely (set to 0 to drain the queue manually only).
NOTIF_CONSUMER_ENABLED=1
# Toggle the GitHub-event filter / int-dev-announce redirect (set to 0 to
# send every event to its declared channel without filtering or redirect).
NOTIF_FILTER_ENABLED=1
# Redis key prefix for all notif-related keys (queue, dead, recent, metrics).
NOTIF_KEY_PREFIX=notif:
# Poll interval when the queue is idle; fast interval kicks in after a tick
# that actually drained something so bursts get processed promptly.
NOTIF_POLL_MS=5000
NOTIF_POLL_FAST_MS=1000
# Heartbeat log frequency on an idle consumer.
NOTIF_HEARTBEAT_MS=60000
# How many envelopes a single tick pulls from the queue. With the batch-
# merge optimization (N events sharing a dedup_key in one tick → 1 API
# call instead of N), larger ticks are strictly better for CI bursts.
# Reasonable range: 50–500.
NOTIF_MAX_PER_TICK=50
# Coalesce limits for non-dedup envelopes sent to the same room in one tick.
NOTIF_COALESCE_MAX_CHARS=24000
NOTIF_COALESCE_MAX_ITEMS=8
# Trackable edit window: events sharing a dedup_key within this many ms
# edit the same Teams activity instead of spawning a new message.
NOTIF_EDIT_WINDOW_MS=1800000
# GitHub commit grouping window: how long to keep editing the same
# trackable message for events carrying the same commit SHA. Independent
# of the edit window because individual commit messages turn over faster.
NOTIF_COMMIT_GROUP_WINDOW_MS=180000
# Upstream→downstream repo map for action-triggered push attribution.
# Format: "upstream/repo:downstream-glob,..." — pushes to a repo matching
# the glob get attributed to the most recent active-CI parent commit in
# the upstream repo, so subtree syncs nest under their triggering CI run.
NOTIF_DOWNSTREAM_REPOS=detain/sugarcraft:sugarcraft/*
# Verbose trace logging for the consumer (every envelope's routing
# decisions). Set to 0 in production once you've finished tuning.
NOTIF_TRACE_LOG=1
# Announce redirect
# NOTIF_ANNOUNCE_REPOS: comma-separated list of repo patterns whose
# notifications get rerouted to int-dev-announce instead of their declared
# channel. Supports exact "owner/repo" or wildcard "owner/*". Use this to
# centralize CI/dev chatter without changing the webhook's room field.
#
# NOTIF_ANNOUNCE_REPOS_EXCLUDE: comma-separated list of repo patterns that
# are EXEMPT from the announce redirect — they keep posting to their
# declared channel even if NOTIF_ANNOUNCE_REPOS matches them. Use this to
# carve out high-signal repos from a broad wildcard rule.
#
# Example (uncomment to use):
# NOTIF_ANNOUNCE_REPOS=detain/*,interserver/*
# NOTIF_ANNOUNCE_REPOS_EXCLUDE=detain/myadmin,detain/teams-chat-bot
NOTIF_ANNOUNCE_REPOS=
NOTIF_ANNOUNCE_REPOS_EXCLUDE=