Conversation
- Add HandlerConfig, ResolvedTemporaryIds, and HandlerResult typedef imports
- Add AddReviewerMessage typedef with specific field types
- Add HANDLER_TYPE constant for consistency with other handler files
- Replace generic {Object} JSDoc param types with specific typed references
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Improves JSDoc typing and consistency for the add_reviewer safe-output handler used in GitHub Actions github-script context.
Changes:
- Imported additional handler-factory typedefs and replaced generic
{Object}JSDoc types with specific typedefs. - Introduced an
AddReviewerMessagetypedef to better describe the handler’s expected message shape. - Added a
HANDLER_TYPE = "add_reviewer"constant to match the pattern used by other handlers.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/add_reviewer.cjs | Refines JSDoc typedef usage for handler inputs/outputs and adds a handler type constant for consistency. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 0
This comment has been minimized.
This comment has been minimized.
1 similar comment
|
Hey One minor note for future jsweep passes:
If you'd like a coding agent to address this automatically in a future pass:
|
Summary
Improved type annotations and code consistency in
actions/setup/js/add_reviewer.cjs.Context Type
github-script — runs in GitHub Actions using
github,core, andcontextglobals.Changes Made
Type Annotations Improved:
HandlerConfig,ResolvedTemporaryIds, andHandlerResulttypedef imports from./types/handler-factoryAddReviewerMessagetypedef with specific field types (reviewers?: Array<string|null|undefined|false>,pull_request_number?: number|string){Object}JSDoc param types with proper specific references ({AddReviewerMessage},{ResolvedTemporaryIds},{Promise<HandlerResult>})Consistency Improvement:
HANDLER_TYPE = "add_reviewer"constant, matching the pattern used in other handler files likeadd_labels.cjs,add_comment.cjs, etc.Test Coverage
The file already had 20 comprehensive tests covering:
No new tests were needed — coverage was already excellent.
✅ Validation Checks
npm run format:cjs✓ (unchanged)npm run lint:cjs✓ (all files use Prettier code style)npm run typecheck✓ (no errors)npx vitest run add_reviewer.test.cjs✓ (20/20 passed)Warning
The following domain was blocked by the firewall during workflow execution:
invalid.example.invalidTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.