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

[Good First Issue]: Update JSDoc for `resetItem` in `bot-inactivity.js`

Open Beginner friendly
#1,529 3 comments 0 reactions 0 assignees View on GitHub
priority: low scope: ci scope: docs skill: good first issue status: blocked
Dominant language
C++
Stars
42
Forks
108
Avg merge
11h 45m
Merged PRs (30d)
2

Description

### 🆕🐥 First-Time Friendly

This issue is especially welcoming for people who are new to contributing to the **Hiero C++ SDK**.

We know that opening your first pull request can feel like a big step. Issues labeled **Good First Issue** are designed to make that experience easier, clearer, and more comfortable.

No prior knowledge of Hiero, Hedera, or distributed ledger technology is required - just a basic familiarity with C++ and Git is more than enough to get started.

> [!IMPORTANT]
> ### 📋 About Good First Issues
>
> Good First Issues are designed to make getting started as smooth and stress-free as possible.
>
> They usually focus on:
> - Small, clearly scoped changes
> - Straightforward updates to existing code or docs
> - Simple refactors or clarity improvements
>
> Other kinds of contributions — like larger features, deeper technical changes, or design-focused work — are just as valuable and often use the beginner, intermediate, or advanced labels.

### 👾 Description of the Task

The `resetItem` function in `.github/scripts/bot-inactivity.js` was updated in PR #1500, but its JSDoc comment was not updated alongside the change. The comment now describes the old behavior and omits the new parameter entirely.

**Current JSDoc (incorrect):**

```javascript
/**
* Resets an item back to "ready for dev": removes assignees, removes
* "status: in progress", adds "status: ready for dev".
*
* @param {object} github
* @param {string} owner
* @param {string} repo
* @param {object} item - Issue or PR object with .number, .assignees, .labels.
* @returns {Promise}
*/
async function resetItem(github, owner, repo, item, { addReadyForDev = true } = {}) {
```

There are three problems:

1. The description says "removes 'status: in progress'" — the function now removes **all** `status:` labels.
2. The description says "adds 'status: ready for dev'" unconditionally — it now only adds that label when `addReadyForDev` is `true`.
3. The `{ addReadyForDev = true }` parameter is undocumented.

### 💡 Proposed Approach

Replace the existing JSDoc block with an accurate description and a `@param` entry for the new options object. No logic changes — this is a documentation-only fix.

**Updated JSDoc (target):**

```javascript
/**
* Resets an item by removing assignees and all status: labels, then optionally
* re-labels it as "status: ready for dev".
*
* @param {object} github
* @param {string} owner
* @param {string} repo
* @param {object} item - Issue or PR object with .number, .assignees, .labels.
* @param {object} [opts]
* @param {boolean} [opts.addReadyForDev=true] - Whether to add the "status: ready for dev" label after cleanup.
* @returns {Promise}
*/
async function resetItem(github, owner, repo, item, { addReadyForDev = true } = {}) {
```

### 👩‍💻 Implementation Steps

- [ ] Open `.github/scripts/bot-inactivity.js`
- [ ] Find the `resetItem` function (around line 377) — look for the JSDoc block that starts with `* Resets an item back to "ready for dev"`
- [ ] Replace the JSDoc description lines and `@param` list with the updated version shown above
- [ ] Confirm the function signature itself (`async function resetItem(...)`) is **not** changed
- [ ] Open a pull request with only this JSDoc change

### ✔️ Acceptance Criteria

- [ ] The JSDoc description accurately reflects the current behavior (removes all `status:` labels, conditionally adds `status: ready for dev`)
- [ ] The `{ addReadyForDev = true }` parameter is documented with a `@param` entry
- [ ] No changes to the function body or any other file
- [ ] All existing tests continue to pass

---

### 📋 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

If you have questions while working on this issue, feel free to ask!

You can reach the community and maintainers here: [Hiero-SDK-C++ Discord](https://discord.com/channels/905194001349627914/1337424839761465364)

Whether you need help finding the right file, understanding existing code, or confirming your approach — we're happy to help.

Contributor guide

Open the contributing guide

Research direction

Open .github/scripts/bot-inactivity.js and find the resetItem function around line 377. Update only its JSDoc so it documents removal of all status: labels, conditional addition of the ready-for-dev label, and the addReadyForDev option; keep the signature and function body unchanged. Confirm no other files change and that existing tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.