Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ymao1 committed Jun 6, 2023
1 parent 474f3e9 commit 1621088
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import { alertFieldMap } from '@kbn/alerts-as-data-utils';
import { RuleAlertData } from '../../types';

const allowedFrameworkFields: string[] = [ALERT_REASON];

/**
* Updates an existing alert document with data from the LegacyAlert class
* Currently only populates framework fields and not any rule type specific fields
* Remove framework fields from the alert payload reported by
* the rule type. Fields are considered framework fields if they are
* defined in the "alertFieldMap". Framework fields should only be
* set by the alerting framework during rule execution.
*/

export const stripFrameworkFields = <AlertData extends RuleAlertData>(
payload: AlertData
): AlertData => {
Expand Down

0 comments on commit 1621088

Please sign in to comment.