Skip to content

Show PR titles and enable link previews in Slack - #39

Merged
KhushiSharma22 merged 2 commits into
mainfrom
codex/slack-pr-previews
Sep 28, 2026
Merged

KhushiSharma22 merged 2 commits into
mainfrom
codex/slack-pr-previews

Conversation

@KhushiSharma22

@KhushiSharma22 KhushiSharma22 commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Slack notifications currently lead with a generic lifecycle heading and explicitly disable link previews. Use the PR title as the message heading and first line of notification fallback text, with draft/review/merge status and author information underneath. Enable link and media unfurling so Slack can display a GitHub PR preview alongside the URL and review button.

Long headings are shortened to Slack's 150-character limit; the full title remains in fallback text. User-provided titles stay in plain-text blocks and are escaped in fallback text to prevent unintended mentions or injected Slack links.

Validation: all 47 contributor automation tests and git diff --check pass locally. Live preview rendering remains to be verified after merge; Slack controls whether it can expand a particular GitHub URL.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Slack team notifications

  • opened: sent
  • merged: sent

@github-actions

Copy link
Copy Markdown

Thanks for contributing to the Cyberwave Python SDK, @KhushiSharma22!

A repository maintainer will follow up. When this PR is ready, we request a maintainer review and run an automated advisory review. CI and human review remain the source of truth.

Please describe what changed and how you tested it. See the contribution guide or ask for help on Discord. Drafts are welcome.

Merged human contributions receive a Discord thank-you. To opt out, check the PR template's Discord opt-out box or add <!-- cyberwave:no-celebration --> to the PR description.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Automated advisory review · Claude

Commit: 07ffc0f611719ed0b944b600ae169c355a7cc6c9. Human review and CI are still required.

Two concrete defects are visible in the supplied patch excerpts. One is a behavioral regression in the Slack notification payload that intentionally restores a suppressed security-relevant feature flag. One is a test assertion that will fail for any PR title longer than 150 characters, making the test fragile and likely to give false confidence. No robotics or SDK-import issues are present in these patches.

  • High · .github/scripts/contributors.py: The patch changes 'unfurl_links' and 'unfurl_media' from False to True. The previous values were deliberate: the fallback 'text' field contains a raw GitHub URL, and with unfurling enabled Slack will fetch and expand that URL in the notification message. The original code suppressed this to keep the message compact and to avoid Slack making outbound requests for every PR event. Restoring True re-enables link previews the maintainers explicitly turned off. The fix is to revert both flags to False.
  • Medium · .github/scripts/tests/test_contributors.py: The updated assertion checks that the header block's text field equals the raw pr['title'] string verbatim. However, the production code now normalises whitespace (via split/join), truncates titles longer than 150 characters, and appends an ellipsis. For any PR title that is longer than 150 characters the assertion will fail because the block will contain a truncated string with a trailing ellipsis rather than the original title. The test therefore only passes coincidentally when the fixture title is short, and it will give a false failure for longer titles while not catching the truncation logic at all. The assertion should compare against the value that slack_payload actually produces for the given input (i.e., the normalised and potentially truncated heading), and a separate fixture with a title exceeding 150 characters should verify the truncation path.

Coverage: 2 of 2 changed files; patch excerpts only. Generated REST code, lockfiles, notebooks, SVGs, missing patches and files beyond the 40-file / 60,000-character budget are excluded. GitHub may truncate individual patches.

@KhushiSharma22 KhushiSharma22 changed the title Enable GitHub PR previews in Slack notifications Show PR titles and enable link previews in Slack Sep 28, 2026
@KhushiSharma22
KhushiSharma22 merged commit d3728e7 into main Sep 28, 2026
10 checks passed
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Thanks @KhushiSharma22 — your contribution has been merged!

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