Skip to content

Commit

Permalink
feat: add logging for incident states and dropdown options in Slack a…
Browse files Browse the repository at this point in the history
…ctions
  • Loading branch information
simlarsen committed Mar 4, 2025
1 parent fea31e7 commit d131bef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions Common/Server/Services/IncidentStateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export class Service extends DatabaseService<IncidentState> {
isAcknowledgedState: true,
isCreatedState: true,
order: true,
name: true
},
props: data.props,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class Service extends DatabaseService<Model> {
case OnCallDutyPolicyStatus.Executing:
return "▶️";
case OnCallDutyPolicyStatus.Completed:
return "";
return "🏁";
case OnCallDutyPolicyStatus.Error:
return "❌";
default:
Expand Down
7 changes: 7 additions & 0 deletions Common/Server/Utils/Workspace/Slack/Actions/Incident.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { DropdownOption } from "../../../../../UI/Components/Dropdown/Dropdown";
import UserNotificationEventType from "../../../../../Types/UserNotification/UserNotificationEventType";
import IncidentState from "../../../../../Models/DatabaseModels/IncidentState";
import IncidentStateService from "../../../../Services/IncidentStateService";
import logger from "../../../Logger";

export default class SlackIncidentActions {
public static isIncidentAction(data: {
Expand Down Expand Up @@ -335,6 +336,9 @@ export default class SlackIncidentActions {
},
});

logger.debug("Incident States: ");
logger.debug(incidentStates);

const dropdownOptions: Array<DropdownOption> = incidentStates
.map((state: IncidentState) => {
return {
Expand All @@ -346,6 +350,9 @@ export default class SlackIncidentActions {
return option.label !== "" || option.value !== "";
});

logger.debug("Dropdown Options: ");
logger.debug(dropdownOptions);

const statePickerDropdown: WorkspaceDropdownBlock = {
_type: "WorkspaceDropdownBlock",
label: "Incident State",
Expand Down

0 comments on commit d131bef

Please sign in to comment.