Skip to content

fix: pass through extra Slack API params in convenience methods#32

Draft
Koan-Bot wants to merge 2 commits into
masterfrom
koan.atoomic/passthrough-extra-params
Draft

fix: pass through extra Slack API params in convenience methods#32
Koan-Bot wants to merge 2 commits into
masterfrom
koan.atoomic/passthrough-extra-params

Conversation

@Koan-Bot

@Koan-Bot Koan-Bot commented May 2, 2026

Copy link
Copy Markdown
Collaborator

What

Convenience methods (post_ok, post_warning, etc.) now pass through unrecognized key-value options to the top-level Slack payload instead of silently dropping them.

Why

Users wanting threaded replies or unfurl control with styled messages had to abandon convenience methods and use raw post(), losing preset colors/attachments. This was a silent data loss — no error, no warning, just dropped parameters.

How

After building the attachments hash, any key not in the reserved set (color, title, text, body, content, post_text) is forwarded to the top-level data hash. Single-arg calls are unaffected.

Testing

  • 3 new test blocks: thread_ts passthrough, multiple extra options, single-arg no-leak
  • All existing tests pass unchanged

🤖 Generated with Claude Code


Quality Report

Changes: 2 files changed, 95 insertions(+), 1 deletion(-)

Code scan: clean

Tests: passed (OK)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

post_ok, post_warning, post_error, post_info, post_start, and post_end
silently dropped any option not in their known set (color, title, text,
body, content, post_text). This meant users couldn't use Slack features
like thread_ts or unfurl_links with convenience methods — they had to
fall back to the raw post() method and lose preset styling.

Now, unrecognized key-value options are passed through to the top-level
Slack payload, enabling threaded replies, unfurl control, etc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cpm now requires Perl 5.24+, breaking CI for older Perl versions
in the Docker-based matrix. cpanm supports Perl 5.8+ and handles
cpanfile installation identically.

The ubuntu job (system Perl 5.38) keeps cpm since it works fine there.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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