fix(ci): make the monthly digest Slack build render (jq parens + PR-index cap)#26
Merged
Merged
Conversation
The rich-digest branch (skip != true) never ran until #25 started returning PRs. Two defects surfaced on the first real run: - jq compile error: `{blocks: [...] + (if ...) + [...]}` parses `blocks: [...]` as the whole value and chokes on the trailing `+`. Wrap the array expression in parentheses: `{blocks: ([...] + ...)}`. - Slack rejects a section over 3000 chars; the full PR index was ~9000 chars for 59 PRs. List only the latest 10 (by number, newest first) and note the total — deeper history belongs in the repo. Verified by extracting the jq program from the workflow and running it against real June data: 8 valid blocks, PR index ~1.6k chars. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #25. That fix let the digest find PRs (
skip != true), which routed the run into the rich-digestelsebranch of Build Slack digest for the first time ever — and exposed two latent defects that only fire on the happy path.1. jq compile error (the run crashed)
jq parses
blocks: [...]as the complete object value, then hits the trailing+→syntax error, unexpected '+'. Fix: wrap the whole array expression in parentheses —{blocks: ([...] + (if ...) + [...])}.2. Slack 3000-char section limit
The PR index concatenated every PR into one
section— ~9,000 chars for June's 59 PRs. Slack rejects any section over 3,000. Now it lists the latest 10 (by PR number, newest first) with a· latest 10 of 59note; full history lives in the repo.Verification
Extracted the exact jq program from the workflow and ran it against real June data for
next-sanity-starter:No
skip-branch change; the "No PRs" path is untouched.🤖 Generated with Claude Code