hiero-ledger / hiero-ledger/hiero-sdk-cpp

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

Open
#1,629 2 comments 0 reactions 0 assignees View on GitHub
status: needs info
Dominant language
C++
Stars
42
Forks
108
Avg merge
11h 45m
Merged PRs (30d)
2

Description

### 👾 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.

Contributor guide

Open the contributing guide

Research direction

Start by inventorying user-facing comments in .github/scripts/helpers/comments.js and the listed command and bot files, then read the corresponding tests. Extract repository-specific links, team mentions, and wording into a simple template/config helper while preserving existing C++ SDK output. Update the string and snapshot assertions, and add coverage for rendering with custom repository values.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.