-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Add script to analyze file hotspots from git history #8591
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
Conversation
|
|
✅ Review Complete Code Review Summary |
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.
1 issue found across 1 file
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="scripts/analyze-file-hotspots.js">
<violation number="1" location="scripts/analyze-file-hotspots.js:13">
The fallback logic treats a valid `0` days argument as falsy, so `node scripts/analyze-file-hotspots.js 0` unexpectedly reverts to the 30-day default; please handle `NaN` explicitly so zero-day runs work as intended.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
|
|
||
| // Parse command line arguments | ||
| const args = process.argv.slice(2); | ||
| const days = parseInt(args[0]) || 30; |
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.
The fallback logic treats a valid 0 days argument as falsy, so node scripts/analyze-file-hotspots.js 0 unexpectedly reverts to the 30-day default; please handle NaN explicitly so zero-day runs work as intended.
Prompt for AI agents
Address the following comment on scripts/analyze-file-hotspots.js at line 13:
<comment>The fallback logic treats a valid `0` days argument as falsy, so `node scripts/analyze-file-hotspots.js 0` unexpectedly reverts to the 30-day default; please handle `NaN` explicitly so zero-day runs work as intended.</comment>
<file context>
@@ -0,0 +1,52 @@
+
+// Parse command line arguments
+const args = process.argv.slice(2);
+const days = parseInt(args[0]) || 30;
+const limit = parseInt(args[1]) || 20;
+
</file context>
|
🎉 This PR is included in version 1.32.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.29.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary by cubic
Add a simple CLI to find git file hotspots. It lists the most edited files in the last N days, sorted by edit count.
Written for commit e846c7c. Summary will update automatically on new commits.