Skip to content

Move Bot Comment Text and Documentation Links into Template/Config Layer #1629

Description

@darshit2308

👾 Description of the Task

Many bot comments currently combine reusable automation logic with C++ SDK-specific wording, documentation links, support team mentions, and contributor guidance.

This makes the bot harder to reuse across SDK repositories because another repository would need to copy and edit JavaScript files just to change text, links, or support contacts.

Relevant Files

  • .github/scripts/helpers/comments.js
  • .github/scripts/commands/assign-comments.js
  • .github/scripts/commands/finalize-comments.js
  • .github/scripts/bot/bot-recommend-issues.js
  • .github/scripts/tests/test-comments.js
  • .github/scripts/tests/test-assign-bot.js
  • .github/scripts/tests/test-finalize-bot.js
  • .github/scripts/tests/test-recommend-issues-bot.js

💡 Proposed Approach

Introduce a template/config layer for bot messages and repository-specific links.

The initial goal should be to extract C++ SDK-specific content, not to build a complex templating system. Simple functions backed by config values are sufficient.

Examples of Content to Extract

  • Signing guide URL
  • Workflow guide URL
  • README setup URL
  • Merge conflict guide URL
  • Discord/community URL
  • Support team mention
  • Maintainer team mention
  • Welcome message repository name
  • PR helper bot wording
  • Skill-level boilerplate text

👩‍💻 Implementation Steps

  • Identify user-facing bot comments that contain C++ SDK-specific text or links
  • Add a message/template helper that receives config values
  • Move documentation URLs and team mentions into config
  • Refactor comment builders to use the message/template helper
  • Keep generated comments unchanged where possible
  • Update snapshot/string assertion tests as needed
  • Add tests for template rendering with custom repository values

✔️ Acceptance Criteria

  • C++ SDK-specific links and team mentions are no longer hardcoded throughout comment logic
  • Existing bot comments remain unchanged for the C++ SDK configuration
  • Tests cover rendering with configured values
  • The comment layer can support another repository without copying and editing bot logic
  • Existing bot script tests continue to pass

🤔 Additional Information

This directly supports reusable automation across SDK repositories while keeping contributor-facing messages clear and repository-specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs infoA maintainer has reviewed the issue but requires more information from the submitter

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions