Add more scripts for closing-obsolete-issues skill - #9979
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces shell scripts with new Dart scripts (fetch_issues.dart and search_prs.dart) for fetching issues and searching PRs, and updates the SKILL.md documentation accordingly. The review feedback highlights a contradictory style constraint in SKILL.md caused by an accidental character replacement, and suggests robustness improvements in the Dart scripts, including validating command-line argument parsing, using idiomatic list pre-allocation, and handling potential JSON decoding exceptions.
| final results = <Map<String, dynamic>?>[]; | ||
| results.length = numbers.length; |
There was a problem hiding this comment.
[NIT] Setting the length property of a growable list directly is discouraged in Dart. It is more idiomatic and safer to use List.filled to pre-allocate the list.
| final results = <Map<String, dynamic>?>[]; | |
| results.length = numbers.length; | |
| final results = List<Map<String, dynamic>?>.filled(numbers.length, null); |
References
- Adhering to consistent style and best practices across all DevTools packages improves collaboration and reduces errors. (link)
I was running with an agent using the 'close-obsolete-issues' skill and it kept making ad-hoc python scripts; I asked it to check them in as Dart scripts. This should make this task faster in the future.