← Commit history

Publish 1.8.3

Drew Owens ·55a691e8bc ·2mo ago ·parent 818616f
4 files changed +14−6
bin/__pycache__/wiki-notify-gchatcpython-312.pyc
⋯ 1 unchanged line ⋯
bin/wiki-notify-gchat+12−4
@@ -695,12 +695,23 @@ def render_table_widgets(shown, tz, me="You", max_comments=None):             verb = {"opened": "opened", "comment": "commented", "closed": "closed",                     "reopened": "reopened"}.get(ev, "activity")             latest = f"Latest: {verb} by {actor} on {when}"+        comments = it.get("comments", [])+        n_c = 8 if max_comments is None else max_comments+        shown_c = comments[-n_c:] if n_c > 0 else []+        # redundancy rule: when the latest event IS the newest rendered+        # comment, the Latest line and that comment's header are the same+        # fact (actor + timestamp) printed twice back to back - drop the line+        latest_is_shown_comment = (+            ev in ("comment", "mention") and shown_c+            and shown_c[-1]["ts"] == it["lastAt"]+            and shown_c[-1]["by"] == (it.get("actor") or "-"))         body = [             title,             dim(f"Page author: {it.get('pageAuthor') or '-'}"),             dim(f"Issue opened by {creator} on {fmt_datetime(it['openedAt'], tz)}"),-            dim(latest),         ]+        if not latest_is_shown_comment:+            body.append(dim(latest))         # involvement renders ONLY when it adds a fact the labeled lines above         # don't already state: "opened this" duplicates Issue-opened-by,         # "owns this page" duplicates Page-author, "was mentioned" duplicates@@ -713,9 +724,6 @@ def render_table_widgets(shown, tz, me="You", max_comments=None):             inv = ""         if inv:             body.append(dim(f"{me} {inv}"))-        comments = it.get("comments", [])-        n_c = 8 if max_comments is None else max_comments-        shown_c = comments[-n_c:] if n_c > 0 else []         if len(comments) > len(shown_c):             body.append(dim(f"<i>+{len(comments) - len(shown_c)} earlier comment(s)</i>"))         for c in shown_c:
package.json+1−1
@@ -2,7 +2,7 @@   "slug": "wiki-notify-gchat",   "title": "Wiki Notify for Google Chat",   "type": "app",-  "version": "1.8.2",+  "version": "1.8.3",   "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.2",+  "version": "1.8.3",   "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",