ci(social-review): edit comments in place + freshness footer#18807
ci(social-review): edit comments in place + freshness footer#18807adamgordonbell merged 9 commits intomasterfrom
Conversation
The skip-review comment was posting on every push that didn't touch the social block, drowning active PRs in noise. Switch to a ::notice:: log line + Step Summary block — same information, discoverable from the run page, no PR-thread churn. /social-review override path unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Today the social-review workflow posts a fresh `## Social Media Review` comment on every push, drowning active PRs in noise. Switch to the edit-in-place pattern that pulumi-bot's preview-link comments use: - Claude writes the review to `.social-review.md` instead of running `gh pr comment`. Body starts with `<!-- social-review -->` marker so future runs can find and replace it. - New step uses `peter-evans/find-comment@v3` to look up the existing comment by marker. - New step uses `peter-evans/create-or-update-comment@v4` to replace the body in place (or post fresh if no marker found yet — first run on any PR). - Footer line in the body documents commit SHA + UTC time so readers can tell at a glance whether they're looking at fresh data. Behavior preserved: - Fail-on-character-limit step still runs and still fails the build for objective length violations (no judgment call there). - Skip-case still goes to log + Step Summary (from prior commit), no PR comment. The Claude action's allowed-tools loses `Bash(gh pr comment:*)` and gains `Write` + `Bash(date:*)`. No new secrets needed. Includes a throwaway draft test post at content/blog/test-social-review-edit-in-place/ to exercise the workflow on this PR. The post has deliberately bad Twitter copy (over 280 chars) and AI-toned LinkedIn copy so we can verify both the char-limit fail path and the PASS/FAIL judgment surface during review. Will be removed before merging this PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Social Media Reviewcontent/blog/test-social-review-edit-in-place/index.mdX — FAIL
LinkedIn — PASSBluesky — PASSSuggested copyX (205/255 chars) — drafted from scratch; original had compounding hard-rule breaks and AI-filler content unrelated to the article:
Suggestions (advisory)These are stylistic notes — they don't block the post.
Bluesky
To apply these suggestions, comment: To re-run the social media review after updates, comment: Updated for commit |
|
Your site preview for commit 05bbc53 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-18807-05bbc53a.s3-website.us-west-2.amazonaws.com |
Today the gate skips re-review only when (a) social block unchanged AND (b) a prior workflow run on this branch had conclusion=success. Problem: the char-limit fail step kills the run AFTER the review comment is already posted, so a stuck-over-limit PR keeps re-running a fresh review on every push even though the verdict is unchanged. Switch the gate to prefer the edit-in-place comment's footer SHA as the baseline. The footer is written atomically with the comment body each review run and is unaffected by later step failures, so it's a more accurate signal of "review posted; verdict applies." Order: 1. Marker comment footer SHA (preferred when present) 2. Last successful run on the branch (legacy fallback) 3. No baseline -> run review Skip-case log/summary handles both baseline sources — links to the prior run when the baseline came from a run, references the existing PR comment when the baseline came from the comment marker. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@claude please review |
|
Claude finished @adamgordonbell's task in 1m 35s —— View job PR Review
The implementation is clean and correct. The test run confirms it works end-to-end. A few notes below. The short-SHA expansion in the footer prompt (line 275)The footer instruction embeds this shell substitution: Claude has A more robust alternative — pre-compute the short SHA in a step before Claude runs, then reference it directly in the prompt string: - name: Compute short SHA
id: sha
run: echo "short=${{ github.event.pull_request.head.sha }}" | cut -c-7 >> "$GITHUB_OUTPUT"Then in the prompt: Action version pinning (lines 283, 291)
Gate-to-comment SHA ordering is soundThe preference order (comment footer SHA → last successful run SHA) is correct. The comment SHA is set atomically with the comment write, so it's always in sync with what the reviewer sees. The Minor:
|
Summary
Changes
`.github/workflows/claude-social-review.yml`:
`content/blog/test-social-review-edit-in-place/` (will delete before merge):
Test plan
Notes