Skip to content

fix: update inactivity bot imports to use .cjs modules#175

Open
Rishiraj-Pathak-27 wants to merge 1 commit into
KDM-cli:mainfrom
Rishiraj-Pathak-27:main
Open

fix: update inactivity bot imports to use .cjs modules#175
Rishiraj-Pathak-27 wants to merge 1 commit into
KDM-cli:mainfrom
Rishiraj-Pathak-27:main

Conversation

@Rishiraj-Pathak-27

@Rishiraj-Pathak-27 Rishiraj-Pathak-27 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes module resolution errors in the inactivity bot by updating helper imports to explicitly reference .cjs files.

Changes

  • Updated logger import to logger.cjs
  • Updated constants import to constants.cjs
  • Updated api import to api.cjs
  • Updated checks import to checks.cjs
  • Updated bot-inactivity-comments import to bot-inactivity-comments.cjs

Reason

The helper scripts were renamed from .js to .cjs, but the inactivity bot was still importing them using extensionless paths. This caused GitHub Actions to fail with:

Cannot find module './helpers/logger'

Summary by CodeRabbit

  • Chores
    • Updated internal module references for improved code consistency and maintainability.

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (2)
Validation error: Invalid input: expected string, received undefined at "reviews.path_instructions[3].path"; Invalid input: expected string, received undefined at "reviews.path_instructions[3].instructions"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 995ab106-8fbd-4289-ade9-de64d4ae7d64

📥 Commits

Reviewing files that changed from the base of the PR and between eba6e52 and dc07158.

📒 Files selected for processing (1)
  • .github/scripts/bot-inactivity.cjs

📝 Walkthrough

Walkthrough

All require() calls in .github/scripts/bot-inactivity.cjs are updated to use explicit .cjs file extensions for the referenced helper modules (logger, constants, api, checks) and the comment-builder module (bot-inactivity-comments). No logic, control flow, or exported API surface is changed.

Changes

CJS Import Path Fix

Layer / File(s) Summary
Update require paths to .cjs extensions
.github/scripts/bot-inactivity.cjs
Logger, constants, API helpers, parseIssueNumbers, and inactivity comment builder imports are changed from extensionless paths to explicit .cjs-suffixed paths.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A hop, a skip, a .cjs trail,
The rabbit fixed each import's tail.
No logic changed, no flows were bent,
Just tidy paths with .cjs meant.
🐇 Extensions aligned, the warren's content!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: updating inactivity bot imports to use .cjs modules, which matches the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No application code in the PR — skipped Code Health checks.

See analysis details in CodeScene

Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant