bito-code-review[bot] commented on code in PR #39837:
URL: https://github.com/apache/superset/pull/39837#discussion_r3238496829
##########
docs/scripts/manage-versions.mjs:
##########
@@ -30,9 +30,11 @@ const __dirname = path.dirname(__filename);
const CONFIG_FILE = path.join(__dirname, '..', 'versions-config.json');
// Parse command line arguments
-const args = process.argv.slice(2);
+const rawArgs = process.argv.slice(2);
+const skipGenerate = rawArgs.includes('--skip-generate');
+const args = rawArgs.filter((a) => a !== '--skip-generate');
const command = args[0]; // 'add' or 'remove'
-const section = args[1]; // 'docs', 'developer_portal', or 'components'
+const section = args[1]; // 'docs', 'developer_docs', or 'components'
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Outdated Comment</b></div>
<div id="fix">
The inline comment for the `section` variable lists supported values but
omits 'admin_docs', which is now a valid section per the updated usage message.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
````suggestion
const section = args[1]; // 'docs', 'developer_docs', 'admin_docs', or
'components'
````
</div>
</details>
</div>
<small><i>Code Review Run #9013c2</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
##########
docs/scripts/manage-versions.mjs:
##########
@@ -211,16 +370,19 @@ function removeVersion(section, version) {
function printUsage() {
console.log(`
Usage:
- node scripts/manage-versions.js add <section> <version>
+ node scripts/manage-versions.js add <section> <version> [--skip-generate]
node scripts/manage-versions.js remove <section> <version>
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Incorrect File Extension</b></div>
<div id="fix">
The usage message and examples incorrectly reference 'manage-versions.js'
instead of the actual file name 'manage-versions.mjs', which could confuse
users copying commands.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```
- node scripts/manage-versions.js add <section> <version> [--skip-generate]
- node scripts/manage-versions.js remove <section> <version]
+ node scripts/manage-versions.mjs add <section> <version>
[--skip-generate]
+ node scripts/manage-versions.mjs remove <section> <version]
Where:
- section: 'docs', 'developer_docs', 'admin_docs', or 'components'
- version: version string (e.g., '1.2.0', '2.0.0')
- --skip-generate: skip refreshing auto-generated docs before
snapshotting
(use when you've already placed a fresh databases.json
from CI and want to preserve it)
Examples:
- node scripts/manage-versions.js add docs 2.0.0
- node scripts/manage-versions.js add developer_docs 1.3.0
+ node scripts/manage-versions.mjs add docs 2.0.0
+ node scripts/manage-versions.mjs add developer_docs 1.3.0
- node scripts/manage-versions.js remove components 1.0.0
+ node scripts/manage-versions.mjs remove components 1.0.0
`);
}
```
</div>
</details>
</div>
<small><i>Code Review Run #9013c2</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]