testbot: let Slack unfurl the PR link into a GitHub card - #1287
Closed
jiaenren wants to merge 1 commit into
Closed
Conversation
The review request posted no preview card. Two reasons: Slack unfurls links from a message's `text`, not from inside Block Kit blocks, and messages posted by a bot do not unfurl unless unfurl_links is set. The blocks array duplicated `text` verbatim, so dropping it costs nothing. With unfurling enabled the official GitHub Slack app -- already installed and unfurling PR links in #osmo-code-reviews -- renders the card under the message. No link_shared handler needed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
📝 WalkthroughWalkthroughThe Slack review payload now sends plain text with link and media unfurling enabled. The test verifies these options and confirms that Block Kit blocks are absent. ChangesSlack review payload
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
3 tasks
Collaborator
Author
|
Superseded by #1290, which combines this with the other open testbot changes. |
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.
Description
The testbot review request posts as plain text with no PR preview card.
Two things in the payload prevented it:
textfield, not from links inside Block Kitblocks.unfurl_linksis set explicitly.The
blocksarray duplicatedtextverbatim, so dropping it changes nothing about how the message reads. With unfurling enabled the GitHub app renders the card under the message.Verification
bazel test //src/scripts/testbot:all //src/scripts/testbot/tests:all— 19 targets pass, including the-pylintsiblings. Added a test asserting the payload enables unfurling and carries noblocks.The rendered card can only be confirmed once this runs with the testbot bot token, since posting as a user unfurls regardless and would not exercise the bot path.
Issue - None
Checklist
🤖 Generated with Claude Code
Summary by CodeRabbit