Skip to content

ci(notifications): collapse commit bodies in Telegram messages - #1019

Merged
T3ST3ST3R0N merged 1 commit into
devfrom
ci/telegram-notify-expandable
Oct 12, 2026
Merged

T3ST3ST3R0N merged 1 commit into
devfrom
ci/telegram-notify-expandable

Conversation

@T3ST3ST3R0N

Copy link
Copy Markdown
Collaborator

Summary

Telegram notifications printed every commit as its whole message flattened onto one line. Squash merges with long bodies turned each notification into a wall of text, and the 4096 character trim then cut the list mid-commit.

Each commit is now one line: its subject and a linked short SHA. The rest of the message goes in a collapsed expandable quote (<blockquote expandable>), unwrapped and without Co-authored-by/Signed-off-by trailers.

🔔 New Push to dev
👤 By: someone
🔗 View Commits

Commits (1):
• fix(admin): apply role disconnect policy changes to existing node users (#1008) (3b70959)
┃ * fix(admin): synchronize users when role disconnect policies change   <- collapsed, tap to expand
┃ ...

Details

  • Length: at most 10 commits are listed, then "…and N more". Their details share a length budget that keeps the message under Telegram's 4096 character limit, so no commit is cut in the middle.
  • Escaping: commit text is escaped in jq for &, < and > only. jq's @html emits &apos;, which Telegram does not accept.
  • Closed PRs now say whether they were merged.
  • Header: shows the commit count.
  • Unchanged: the read-only token, link previews (still off), and the targets parsing.

Testing

I extracted the run: script and ran it with jq 1.7.1 (the ubuntu-latest version). A stub curl returned real GitHub API data and recorded the Telegram calls. A checker then validated the tags and entities and measured each message's visible length.

Cases:

All passed. The longest message was about 3500 characters.

Each commit was printed as its whole message flattened onto one line,
so squash merges with long bodies made every notification a wall of
text, and the 4096 character trim then cut the list mid-commit.

List each commit as its subject with a linked short SHA, and put the
rest of the message in a collapsed expandable quote, unwrapped and
without Co-authored-by/Signed-off-by trailers. At most 10 commits are
listed, and their details share a length budget that keeps the message
under Telegram's limit. Commit text is escaped in jq for & < > only,
since jq's @html emits &apos;, which Telegram does not accept. Closed
PRs now say whether they were merged, and the commit count is shown.
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e30f227c-7c0d-4072-bda4-ad4d1592f23a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@T3ST3ST3R0N
T3ST3ST3R0N merged commit 3938936 into dev Oct 12, 2026
7 checks passed
@T3ST3ST3R0N
T3ST3ST3R0N deleted the ci/telegram-notify-expandable branch October 12, 2026 22:14
Free-Guy-IR added a commit to Free-Guy-IR/panel that referenced this pull request Nov 2, 2026
…am up to 2026-10-17

Owner rule of 2026-10-14: upstream changes are ported only from final
upstream releases. Checked with git ls-remote on 2026-10-17 20:53 UTC;
no new release since panel v5.4.1, node v0.5.4 and node_bridge_py v0.9.2
(GitHub releases, PyPI and npm also unchanged).

Panel: the 79 Port queue entries are all dev-only, so they move to the
new "Held for an upstream release" section with their security
classification and without deadlines, and the queue is empty. Upstream
dev moved to a2fb313 with 25 commits: PasarGuard#1019 is waived (the fork deleted
the notifier workflow), the other 24 are held, three of them classified
security: yes (PasarGuard#1004 role permissions on custom API keys, PasarGuard#1005 role
limits on bulk updates, PasarGuard#1008 role disconnect policy). New branches
feat/live-core-apply and two masque commits are UNMERGED-WIP;
fix/xray-wg-allocation-view is the same patch as held ba27c1cc6.

Node: five earlier dev-only picks are on fork main 0071e2c with trailers
and leave the queue; the other eight queue entries and four new dev
commits (PasarGuard#58, PasarGuard#55, PasarGuard#104, PasarGuard#106) are held, with f72ac0ef (PasarGuard#99) and a3d2d2fe
(PasarGuard#101) marked as fixed by the fork's own fixes per the 2026-10-14
decisions. PasarGuard#100 (refuse to start without a valid API_KEY) is ported by
design: fork commit 88162e2 already fails fast.

node_bridge_py: 27be206 is ported on fork main 6116922; 22f1ef79 and the
v0.9.2 bump bec9cb22 are recorded as ported by design (the one flagged
line belongs to the fork's own add_backend, and the fork labels itself
0.9.2+singbox); upstream main's new PasarGuard#24 (9fa9f264) is held.

scripts: fork main 51edabb has upstream main bba95f274 as an ancestor, so
its thirteen queue lines are ported (decision 7 keeps them).

Against live upstream the panel gate is green (282 commits, 0 unported,
103 held, 0 owed) and every fork tracker is green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant