-
Notifications
You must be signed in to change notification settings - Fork 144
chore: enable coderabbit for beginner issues #1387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: enable coderabbit for beginner issues #1387
Conversation
Signed-off-by: Kushagra Kaushik <[email protected]> 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]>
|
Hi, this is WorkflowBot.
|
📝 WalkthroughWalkthroughExpanded 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ 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. Comment |
There was a problem hiding this 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
📒 Files selected for processing (3)
.github/scripts/coderabbit_plan_trigger.js.github/workflows/archived/bot-pr-auto-draft-on-changes.ymlCHANGELOG.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.payloadfields MUST be validatedFree-form text MUST NOT be trusted
Dynamic code execution is prohibited
Avoid
child_process.exec; preferexecFileif neededAll 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.
|
@hiero-ledger/hiero-sdk-python-triage if available |
|
You have done a great work! TYSM, but we also need to update the validation in the |
MonaaEid
left a comment
There was a problem hiding this 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.
…l name 'beginner' Signed-off-by: Kushagra Kaushik <[email protected]>
Signed-off-by: Kushagra Kaushik <[email protected]>
There was a problem hiding this 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_dispatchinput withdry_runparameter: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: numberThen pass the
dry_runflag 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
📒 Files selected for processing (2)
.github/workflows/bot-coderabbit-plan-trigger.ymlCHANGELOG.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.
|
Thanks for the feedback, and sorry for missing those earlier. |
MonaaEid
left a comment
There was a problem hiding this 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 Report✅ All modified and coverable lines are covered by tests. @@ 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:
|
aceppaluni
left a comment
There was a problem hiding this 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
|
Thank you so much @kushagrakaushik for this contribution |

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