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

[Beginner]: Ping maintainers when no recommended issues are available after PR merge

Open
#1,413 29 comments 0 reactions 0 assignees View on GitHub
priority: medium scope: ci skill: beginner status: ready for dev
Dominant language
C++
Stars
42
Forks
108
Avg merge
11h 45m
Merged PRs (30d)
2

Description

### 🐥 Beginner Friendly

This issue is a great fit for contributors who are ready to explore the Hiero C++ codebase a little more and take on slightly more independent work.

Beginner Issues often involve reading existing code, understanding how different parts of the SDK fit together, and making small, thoughtful updates that follow established patterns.

The goal is to support skill growth while keeping the experience approachable, well-scoped, and enjoyable.

> [!IMPORTANT]
> ### 🐥 About Beginner Issues
>
> Beginner Issues are a great next step for contributors who feel comfortable with the basic project workflow and want to explore the codebase a little more.
>
> These issues often involve:
> - Reading existing code
> - Understanding how different parts of the SDK fit together
> - Making small, thoughtful updates that follow established patterns
>
> You'll usually see Beginner Issues focused on things like:
> - Small, well-scoped improvements to existing tests
> - Narrow updates to existing functionality (e.g. refining helpers or improving readability)
> - Documentation or comment clarity
> - Enhancements to existing examples
>
> Other types of contributions — such as brand-new features, broader system changes, or deeper technical work — are just as valuable and may use different labels.

### 👾 Description of the Task

When a contributor merges a PR, the bot runs `handleRecommendIssues` in `.github/scripts/commands/recommend-issues.js` to suggest next issues to work on. Currently, when no suitable issues are found (the `issues.length === 0` case), the bot silently returns without posting any comment. The contributor receives no feedback at all — a missed opportunity to keep them engaged and to signal to maintainers that the issue queue needs replenishment.

When no issues are available, the bot should post a comment on the PR tagging the maintainer team (`@hiero-ledger/hiero-sdk-cpp-maintainers`) to let them know more issues are needed at the appropriate skill level.

Relevant files:
```
.github/scripts/commands/recommend-issues.js
.github/scripts/tests/test-recommend-issues-bot.js
```

### 💡 Proposed Approach

Add a new comment builder function, `buildMaintainerNudgeComment(username, nextLevel)`, to `.github/scripts/commands/recommend-issues.js`. This function should return a message that:
- Acknowledges the contributor by `@username`
- Tags `MAINTAINER_TEAM`
- States that no issues are currently available at the target skill level
- Asks maintainers to create or finalize more issues at that level

In `handleRecommendIssues`, update the empty case (currently `if (issues.length === 0) { ... return; }`) to:
1. Compute `getNextLevel(skillLevel)` to determine the target level the contributor is ready for (this returns `skillLevel` itself when already at the highest level)
2. Call `postComment` with the result of `buildMaintainerNudgeComment`

`MAINTAINER_TEAM` is already imported at the top of `recommend-issues.js` — no new imports are needed.

### 👩‍💻 Implementation Steps

- [ ] Read `.github/scripts/commands/recommend-issues.js` to understand the existing `handleRecommendIssues` flow and the existing comment builder pattern (`buildRecommendationErrorComment`)
- [ ] Add a `buildMaintainerNudgeComment(username, nextLevel)` function to `recommend-issues.js` that:
- Greets the contributor by `@username`
- Tags `MAINTAINER_TEAM`
- States that no open issues are currently available at the `nextLevel` skill level
- Asks maintainers to create or finalize more issues at that level so the contributor has a clear next step
- [ ] In `handleRecommendIssues`, replace the silent `return` in the `issues.length === 0` branch with:
- A call to `getNextLevel(skillLevel)` to determine the target level
- A `postComment` call using `buildMaintainerNudgeComment(username, nextLevel)`
- [ ] Export `buildMaintainerNudgeComment` from `recommend-issues.js` (add it to the `module.exports` object at the bottom of the file)
- [ ] Add unit tests for `buildMaintainerNudgeComment` in `.github/scripts/tests/test-recommend-issues-bot.js` following the style of the existing comment builder tests in that file
- [ ] Add a test for the empty-results case in `handleRecommendIssues` verifying that the maintainer nudge comment is posted and no recommendation comment is posted
- [ ] Open a pull request with the change

### ✔️ Acceptance Criteria

- [ ] When a PR is merged and no suitable issues are found, the bot posts a comment on the PR tagging `@hiero-ledger/hiero-sdk-cpp-maintainers` asking them to create more issues at the appropriate skill level
- [ ] The comment includes the contributor's `@username` and the target skill level
- [ ] `buildMaintainerNudgeComment` is covered by unit tests
- [ ] The empty-results case in `handleRecommendIssues` is covered by a test verifying the nudge comment is posted and the success comment is not
- [ ] All existing tests continue to pass
- [ ] No unrelated behavior changes are introduced

---

### 📋 Step-by-Step Contribution Guide

To help keep contributions consistent and easy to review, we recommend following these steps:

- [ ] Comment `/assign` to request the issue
- [ ] Wait for assignment
- [ ] Fork the repository and create a branch
- [ ] Set up the project using the instructions in `README.md`
- [ ] Make the requested changes
- [ ] Sign each commit using `-s -S`
- [ ] Push your branch and open a pull request

Read [Workflow Guide](https://github.com/hiero-ledger/hiero-sdk-cpp/blob/main/docs/training/workflow.md) for step-by-step workflow guidance.
Read [README.md](https://github.com/hiero-ledger/hiero-sdk-cpp/blob/main/README.md) for setup instructions.

❗ Pull requests **cannot be merged** without `S` and `s` signed commits.
See the [Signing Guide](https://github.com/hiero-ledger/hiero-sdk-cpp/blob/main/docs/training/signing.md).

### 🤔 Additional Information

The existing `buildRecommendationErrorComment` function in `recommend-issues.js` already demonstrates how to tag `MAINTAINER_TEAM` in a bot comment — use it as a reference when writing `buildMaintainerNudgeComment`.

`MAINTAINER_TEAM` is already imported at the top of `recommend-issues.js` via the `helpers` module, so no additional imports are needed.

If you have questions while working on this issue, feel free to ask! [Hiero-SDK-C++ Discord](https://discord.com/channels/905194001349627914/1337424839761465364)

Contributor guide

Open the contributing guide

Research direction

Read .github/scripts/commands/recommend-issues.js, especially handleRecommendIssues and buildRecommendationErrorComment, then inspect .github/scripts/tests/test-recommend-issues-bot.js for comment-builder and handler tests. Add and export the maintainer nudge builder, post it when no issues are found, and verify the nudge appears while the recommendation comment does not; run the existing test file.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.