-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #25
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
Develop #25
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,8 @@ import type { | |
| ReopenCommandInput, | ||
| ResourceAssignment, | ||
| ResourceAssignmentResult, | ||
| SendMessageToCommandInput, | ||
| SendMessageToCommandResult, | ||
| SetNeedStatusInput, | ||
| TacticalObjective, | ||
| TacticalObjectiveResult, | ||
|
|
@@ -61,6 +63,12 @@ export const transferCommand = async (input: TransferCommandInput) => { | |
| return response.data; | ||
| }; | ||
|
|
||
| /** Sends a free-form message directly to the incident's commander (and optionally deputies) via their notification channels. */ | ||
| export const sendMessageToCommand = async (input: SendMessageToCommandInput) => { | ||
|
Comment on lines
+66
to
+67
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing return type documentation violates Rule [23] for async functions. Update the JSDoc to include Kody rule violation: Document async/Promise behavior and errors Prompt for LLMTalk to Kody by mentioning @kody Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction. |
||
| const response = await createApiEndpoint('/IncidentCommand/SendMessageToCommand').post<SendMessageToCommandResult>({ ...input }); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing error handling violates Rule [28] by exposing the network POST call without contextual wrapping. Enclose the external request in a try/catch block, log contextual data such as endpoint names and input identifiers, and map the result to an application-level domain error. Kody rule violation: Add try-catch blocks for external calls Prompt for LLMTalk to Kody by mentioning @kody Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction. |
||
| return response.data; | ||
| }; | ||
|
|
||
| export const closeCommand = async (incidentCommandId: string) => { | ||
| const response = await createApiEndpoint(`/IncidentCommand/CloseCommand/${encodeURIComponent(incidentCommandId)}`).put<IncidentCommandResult>({}); | ||
| return response.data; | ||
|
|
||
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Resgrid/IC
Length of output: 4668
Treat underscores as part of the token boundary.
[:alnum:]does not include_, so inputs likePR_STATUSorRelease PR STATUSare incorrectly rewritten toRelease_STATUS/Release Release STATUS. Include the underscore in both surrounding boundary classes.Suggested fix
Add regression coverage for
PR,PRs,PROXY, andPR_STATUS.📝 Committable suggestion
🤖 Prompt for AI Agents