Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,14 @@ export const getRulesFromObjects = async (
isAlertType(matchingRule) &&
matchingRule.params.immutable !== true
) {
const rule = internalRuleToAPIResponse(matchingRule, legacyActions[matchingRule.id]);

// Fields containing runtime information shouldn't be exported. It causes import failures.
delete rule.execution_summary;
Comment on lines +121 to +124
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Let's extract this into a function with a clear name, e.g. transformRuleToExportableFormat or something like that


return {
statusCode: 200,
rule: internalRuleToAPIResponse(matchingRule, legacyActions[matchingRule.id]),
rule,
};
} else {
return {
Expand Down