fix: update inactivity bot imports to use .cjs modules#175
fix: update inactivity bot imports to use .cjs modules#175Rishiraj-Pathak-27 wants to merge 1 commit into
Conversation
|
Warning
|
| 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
.cjstrail,
The rabbit fixed each import's tail.
No logic changed, no flows were bent,
Just tidy paths with.cjsmeant.
🐇 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.
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Fixes module resolution errors in the inactivity bot by updating helper imports to explicitly reference
.cjsfiles.Changes
loggerimport tologger.cjsconstantsimport toconstants.cjsapiimport toapi.cjschecksimport tochecks.cjsbot-inactivity-commentsimport tobot-inactivity-comments.cjsReason
The helper scripts were renamed from
.jsto.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