app
Wiki Notify for Google Chat
Public Made by Adomby adom
Turn wiki.adom.inc notification emails into a live Google Chat board. One card, one row per issue - newest first, OPEN/CLOSED status, origination date, actor, and a View link - continuously updated in your own Chat space via your own webhook. Emails are swept out of your inbox (trash, archive, or label). Closed items linger until 6am the next day, then drop off. Delegates all auth to adom-google; the only secret is your webhook URL, kept in your private config.
← Commit history
Publish 1.8.4
4 files changed
+37−3
bin/__pycache__/wiki-notify-gchatcpython-312.pyc⋯ 1 unchanged line ⋯
bin/wiki-notify-gchat+35−1@@ -587,6 +587,39 @@ def weekly_summary(state, cfg, force=False): return True ++def ensure_messages_alive(state, cfg):+ """A HISTORY_OFF space hard-expires every message ~24h after posting (no+ tombstone - hit live: the Aug 19 weekly digest vanished by Aug 21, and a+ quiet board would vanish the same way while the hash guard saw no reason+ to repost). Detect vanished board/weekly messages and repost them.+ Throttled to every 15 min; a transient GET failure just means one extra+ repost, which the swap logic tolerates."""+ now = time.time()+ if now - state.get("lastAliveCheck", 0) < 900:+ return False+ state["lastAliveCheck"] = now+ force_board = False+ bm = state.get("boardMsg")+ if bm:+ try:+ gapi(f"{CHAT}/{bm}")+ except RuntimeError:+ log_line(f"WARN board card vanished (history-off expiry?) - reposting: {bm}")+ state["boardMsg"] = ""+ force_board = True+ wm = state.get("weeklyMsg")+ if wm:+ try:+ gapi(f"{CHAT}/{wm}")+ except RuntimeError:+ log_line(f"WARN weekly summary vanished (history-off expiry?) - reposting: {wm}")+ state["weeklyMsg"] = ""+ weekly_summary(state, cfg, force=True)+ save_state(state)+ return force_board++ def trim_comments_daily(state, cfg): """Once a day at purgeHour (same moment closed items are cleared), collapse every item's comment thread to just its most recent comment so boards do@@ -995,7 +1028,8 @@ def cmd_run(as_json, dry_run=False, quiet=False): sync_issue_status(state, cfg) annotate_page_ownership(state, me_full) weekly_summary(state, cfg)- board_changed = push_board(cfg, state, force=daily_fired)+ alive_force = ensure_messages_alive(state, cfg)+ board_changed = push_board(cfg, state, force=daily_fired or alive_force) except Exception as e: errors.append(f"board: {e}") log_line(f"ERROR board {e}")
package.json+1−1@@ -2,7 +2,7 @@ "slug": "wiki-notify-gchat", "title": "Wiki Notify for Google Chat", "type": "app",- "version": "1.8.3",+ "version": "1.8.4", "description": "Turn wiki.adom.inc notification emails into a live Google Chat board. One card, one row per issue - newest first, OPEN/CLOSED status, origination date, actor, and a View link - continuously updated in your own Chat space via your own webhook. Emails are swept out of your inbox (trash, archive, or label). Closed items linger until 6am the next day, then drop off. Delegates all auth to adom-google; the only secret is your webhook URL, kept in your private config.", "tags": [ "cli",
page.json+1−1@@ -2,7 +2,7 @@ "slug": "wiki-notify-gchat", "title": "Wiki Notify for Google Chat", "type": "app",- "version": "1.8.3",+ "version": "1.8.4", "description": "Turn wiki.adom.inc notification emails into a live Google Chat board. One card, one row per issue - newest first, OPEN/CLOSED status, origination date, actor, and a View link - continuously updated in your own Chat space via your own webhook. Emails are swept out of your inbox (trash, archive, or label). Closed items linger until 6am the next day, then drop off. Delegates all auth to adom-google; the only secret is your webhook URL, kept in your private config.", "tags": [ "cli",