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.1
4 files changed
+30−15
bin/__pycache__/wiki-notify-gchatcpython-312.pyc⋯ 1 unchanged line ⋯
bin/wiki-notify-gchat+28−13@@ -223,6 +223,28 @@ EVENT_PATTERNS = [ ] ++def parse_wiki_ts(raw):+ """Wiki API timestamps arrive in BOTH legacy ('2026-08-18 14:38:51') and+ ISO 8601 ('2026-08-19T20:10:07.079Z') forms - the format migrated+ field-by-field mid-2026 (closed_at first). Returns epoch ms or None;+ never assume one format, the silent-fallback bug stamped closes with the+ open time and got items purged the same day."""+ if not raw:+ return None+ try:+ dt = datetime.strptime(raw, "%Y-%m-%d %H:%M:%S").replace(tzinfo=timezone.utc)+ return int(dt.timestamp() * 1000)+ except ValueError:+ pass+ try:+ dt = datetime.fromisoformat(str(raw).replace("Z", "+00:00"))+ if dt.tzinfo is None:+ dt = dt.replace(tzinfo=timezone.utc)+ return int(dt.timestamp() * 1000)+ except ValueError:+ return None+ def page_info(page, state): """Author + raster hero URL of a wiki page via `adom-wiki page stats` (cached in state). Hero must be a public raster blob - Chat's image proxy@@ -273,13 +295,9 @@ def enrich_issue_meta(state, me_full): continue if dd.get("author_name"): it["creator"] = dd["author_name"]- ca = dd.get("created_at")- if ca:- try:- dt = datetime.strptime(ca, "%Y-%m-%d %H:%M:%S").replace(tzinfo=timezone.utc)- it["openedAt"] = int(dt.timestamp() * 1000)- except ValueError:- pass+ ca_ms = parse_wiki_ts(dd.get("created_at"))+ if ca_ms is not None:+ it["openedAt"] = ca_ms if (it.get("invLabel") == "opened this" and me_full and it.get("creator") and it["creator"] != me_full): it["invLabel"], it["invRank"] = "", 0 # footer contradicted the wiki DB@@ -338,12 +356,9 @@ def sync_issue_status(state, cfg, force=False): it["status"] = dd["status"] changed = True if dd["status"] == "closed":- ts = it["lastAt"]- try:- dt = datetime.strptime(dd.get("closed_at", ""), "%Y-%m-%d %H:%M:%S").replace(tzinfo=timezone.utc)- ts = int(dt.timestamp() * 1000)- except (ValueError, TypeError):- pass+ ts = parse_wiki_ts(dd.get("closed_at"))+ if ts is None:+ ts = it["lastAt"] it["closedAt"] = ts if ts >= it["lastAt"]: it["lastAt"] = ts
package.json+1−1@@ -2,7 +2,7 @@ "slug": "wiki-notify-gchat", "title": "Wiki Notify for Google Chat", "type": "app",- "version": "1.8.0",+ "version": "1.8.1", "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.0",+ "version": "1.8.1", "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",