Skip to content

feat(automation): support public reply variations (#31) - #71

Open
Cid-oe wants to merge 1 commit into
CharanMN7:masterfrom
Cid-oe:feat/issue-31-public-reply-variations
Open

feat(automation): support public reply variations (#31)#71
Cid-oe wants to merge 1 commit into
CharanMN7:masterfrom
Cid-oe:feat/issue-31-public-reply-variations

Conversation

@Cid-oe

@Cid-oe Cid-oe commented Sep 8, 2026

Copy link
Copy Markdown

Summary

Resolves #31.

Allows rules to define multiple public reply variations (one per line or JSON array format), picking one at random per send using crypto.getRandomValues.

Changes

  • Added parsePublicReplyVariations and selectPublicReply to src/process.ts.
  • Integrated selectPublicReply into comment processing when sending public replies.
  • Retained full backward compatibility for existing single-value text and blank values with zero migration needed.
  • Empty/blank lines in variations are cleanly ignored.
  • Updated admin rule form helper note on the public_reply_text textarea to explain line-separated variations.
  • Added comprehensive unit tests in scripts/test-unit.ts covering single-value strings, multiline variations, blank lines, JSON array inputs, and random selection.

Validation

  • npm test passed (48 tests pass).
  • npm run typecheck passed cleanly.

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.

Public reply variations, so a comment section stops looking like a bot

1 participant