Skip to content

Conversation

@kushagrakaushik
Copy link
Contributor

Renamed hasIntermediateOrAdvancedLabel to hasBeginnerOrHigherLabel and modified it to check if the issue label has label beginner or higher.

Changed the calling of hasIntermediateOrAdvancedLabel to hasBeginnerOrHigherLabel

Fixes #1385

Signed-off-by: Kushagra Kaushik <[email protected]>
Signed-off-by: Kushagra Kaushik <[email protected]>
Signed-off-by: Kushagra Kaushik <[email protected]>
… is beginner or higher

Signed-off-by: Kushagra Kaushik <[email protected]>
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Hi, this is WorkflowBot.
Your pull request cannot be merged as it is not passing all our workflow checks.
Please click on each check to review the logs and resolve issues so all checks pass.
To help you:

@kushagrakaushik kushagrakaushik changed the title Archive workflow Modified hasIntermediateOrAdvancedLabel Jan 7, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

📝 Walkthrough

Walkthrough

Expanded CodeRabbit's trigger to treat "beginner" issues the same as "intermediate" and "advanced": the label-check function was renamed and its allowed-set updated so the automation runs for beginner-or-higher labeled issues.

Changes

Cohort / File(s) Summary
Label validation & workflow
/.github/scripts/coderabbit_plan_trigger.js, /.github/workflows/bot-coderabbit-plan-trigger.yml
Renamed hasIntermediateOrAdvancedLabel()hasBeginnerOrHigherLabel() and replaced explicit intermediate/advanced checks with allowed set ['beginner','intermediate','advanced']. Workflow conditional updated to match beginner (case variants) alongside existing labels.
Changelog
CHANGELOG.md
Added entries documenting the function rename and logic change to include beginner labels (duplicate/related lines present).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main objective: enabling coderabbit for beginner issues.
Description check ✅ Passed The description clearly explains the changes made: renaming the function and modifying its logic to include beginner labels.
Linked Issues check ✅ Passed The PR fully implements issue #1385 requirements: renamed function, expanded logic to include beginner labels in both script and workflow files.
Out of Scope Changes check ✅ Passed All changes directly align with issue #1385 objectives. No extraneous modifications detected beyond the scope of enabling beginner issue support.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/scripts/coderabbit_plan_trigger.js (1)

1-1: Update the top-level comment to include "beginner" issues.

The comment still references only "intermediate and advanced issues" but the script now handles beginner-labeled issues as well.

📝 Proposed fix
-// Script to trigger CodeRabbit plan for intermediate and advanced issues
+// Script to trigger CodeRabbit plan for beginner, intermediate and advanced issues
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 89afede and b5ff28e.

📒 Files selected for processing (3)
  • .github/scripts/coderabbit_plan_trigger.js
  • .github/workflows/archived/bot-pr-auto-draft-on-changes.yml
  • CHANGELOG.md
🧰 Additional context used
📓 Path-based instructions (1)
.github/scripts/**/*.js

⚙️ CodeRabbit configuration file

.github/scripts/**/*.js: Review JavaScript scripts as long-lived automation code.

Scripts must remain:

  • Focused

  • Readable

  • Purpose-built

  • All context.payload fields MUST be validated

  • Free-form text MUST NOT be trusted

  • Dynamic code execution is prohibited

  • Avoid child_process.exec; prefer execFile if needed

  • All async operations MUST be wrapped in try/catch

  • Errors MUST include contextual metadata

  • Duplicate API calls MUST be avoided

  • Marker-based deduplication is required

  • Scripts MUST NOT assume write access

  • Permission failures MUST be handled gracefully

Files:

  • .github/scripts/coderabbit_plan_trigger.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
CHANGELOG.md (1)

92-94: LGTM! Changelog entries are accurate and well-formatted.

The changelog entries correctly document both the function rename/logic update and the workflow archival, with appropriate issue references.

@kushagrakaushik kushagrakaushik changed the title Modified hasIntermediateOrAdvancedLabel enable coderabbit for beginner issues Jan 7, 2026
@kushagrakaushik kushagrakaushik changed the title enable coderabbit for beginner issues chore: enable coderabbit for beginner issues Jan 7, 2026
@kushagrakaushik
Copy link
Contributor Author

Hi @MonaaEid
I’ve addressed the requested changes for issue #1385.
Could you please review when you get time? Thanks.

@exploreriii
Copy link
Contributor

@hiero-ledger/hiero-sdk-python-triage if available

@MonaaEid
Copy link
Contributor

MonaaEid commented Jan 7, 2026

You have done a great work! TYSM, but we also need to update the validation in the .github/workflows/bot-coderabbit-plan-trigger.yml workflow since it skips when the beginner label is present, Sorry about that. should we make this change in this issue or open a new one for it? @exploreriii
image

Copy link
Contributor

@MonaaEid MonaaEid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, just take care of the changelog entry and we’ll wait for exploreriii to confirm the workflow section.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/bot-coderabbit-plan-trigger.yml (2)

1-1: Update the comment to reflect beginner issue support.

The comment still references only "intermediate and advanced issues" but the workflow now also triggers for beginner-labeled issues. This should be updated for accuracy.

📝 Proposed fix
-# This workflow automatically triggers CodeRabbit's plan feature for intermediate and advanced issues.
+# This workflow automatically triggers CodeRabbit's plan feature for beginner, intermediate, and advanced issues.

3-10: Consider adding dry-run support for safer testing.

As per coding guidelines, workflows that mutate GitHub state should support dry-run mode. This workflow likely posts comments to issues through the CodeRabbit script, but has no mechanism to test changes safely without affecting production issues.

Consider adding a workflow_dispatch input with dry_run parameter:

on:
  issues:
    types: [opened, labeled]
  workflow_dispatch:
    inputs:
      dry_run:
        description: 'Run in dry-run mode (no state changes)'
        required: false
        default: 'true'
        type: choice
        options:
          - 'true'
          - 'false'
      issue_number:
        description: 'Issue number to test with'
        required: false
        type: number

Then pass the dry_run flag to the script and ensure it logs actions instead of executing them when enabled.

Based on coding guidelines, workflows that mutate GitHub state should support dry-run mode for safer testing and development.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b5ff28e and 18fc08e.

📒 Files selected for processing (2)
  • .github/workflows/bot-coderabbit-plan-trigger.yml
  • CHANGELOG.md
🧰 Additional context used
📓 Path-based instructions (1)
.github/workflows/**/*

⚙️ CodeRabbit configuration file

.github/workflows/**/*: Review workflows as security-sensitive infrastructure.

A good workflow is small, focused, and boring.
If a workflow is clever, generic, or overly flexible, it is a risk.


PRIORITY 0 — ABSOLUTE REQUIREMENTS

  • All third-party actions MUST be pinned to full commit SHAs, similar to other workflows.
  • permissions: MUST be explicitly declared and minimally scoped.
  • Workflows MUST behave safely when executed from forks.
  • YAML MUST orchestrate steps, not implement business logic.
  • Any workflow that mutates GitHub state MUST support dry-run mode.
  • Dry-run behavior must be explicit and visible in logs.
  • Workflows MUST NOT modify repository source code outside .github/.

PRIORITY 1 — SCOPE, FOCUS & RESTRAINT

  • The title of each workflow must be relevant, match similar naming schemes, and match its script filename.
  • Each workflow MUST have a single, clearly defined objective and SHOULD document this in a top-level comment.
  • Flag workflows that:
    • Attempt to be generic “frameworks”
    • Include speculative or future-facing logic
    • Perform actions unrelated to the stated goal
  • Over-abstraction and excess flexibility are maintenance risks.

PRIORITY 2 — INPUT HARDENING

  • Treat ALL GitHub event data as potentially hostile input, including:
    • issue titles, bodies, and comments
    • labels, usernames, branch names
  • Free-form user input MUST NOT be passed directly into:
    • shell commands
    • gh CLI arguments
    • Node.js exec / spawn calls
  • Require strict allowlists or exact string matches.
  • Flag any use of:
    • eval or bash -c
    • backticks or $(...) with user-controlled input

------------------...

Files:

  • .github/workflows/bot-coderabbit-plan-trigger.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
CHANGELOG.md (1)

149-149: LGTM!

The changelog entry accurately describes the change and is correctly placed as the final item in the Changed section, addressing the previous review feedback.

@kushagrakaushik
Copy link
Contributor Author

Thanks for the feedback, and sorry for missing those earlier.
I’ve now updated the workflow validation and moved the changelog entry to the end of the Changed section as requested.
Please let me know if anything else needs adjustment.

Copy link
Contributor

@MonaaEid MonaaEid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @kushagrakaushik

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1387   +/-   ##
=======================================
  Coverage   92.44%   92.44%           
=======================================
  Files         139      139           
  Lines        8528     8528           
=======================================
  Hits         7884     7884           
  Misses        644      644           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@aceppaluni aceppaluni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super great work @kushagrakaushik

@exploreriii
Copy link
Contributor

Thank you so much @kushagrakaushik for this contribution
and thank you for your help reviewing this PR!

@exploreriii exploreriii merged commit 69e6a32 into hiero-ledger:main Jan 8, 2026
19 checks passed
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.

[Beginner]: Extend code rabbit to automatically plan on beginner issues

4 participants