Skip to content

feat: Use NamePrefix parameter to also prefix `alertDisplayNameForm… - #52

Merged
f-bader merged 1 commit into
mainfrom
40-modify-alertdisplaynameformat-when-nameprefix-is-set
Feb 24, 2026
Merged

f-bader merged 1 commit into
mainfrom
40-modify-alertdisplaynameformat-when-nameprefix-is-set

Conversation

@f-bader

@f-bader f-bader commented Feb 24, 2026

Copy link
Copy Markdown
Owner

This pull request enhances the handling of the NamePrefix parameter in analytic rule conversion, ensuring that the prefix is also applied to the alertDisplayNameFormat property within alertDetailsOverride when present. It also adds comprehensive tests to verify this new behavior and introduces a relevant example YAML file for testing.

Enhancements to NamePrefix handling:

  • Updated Convert-SentinelARYamlToArm.ps1 so that when NamePrefix is specified, it now also prefixes alertDisplayNameFormat in alertDetailsOverride if this property exists.

Testing improvements:

  • Added a new example YAML file (ScheduledWithAlertDetailsOverride.yaml) that includes alertDetailsOverride to support the new test scenarios.
  • Extended test parameters to include the new example file path for use in integration tests.
  • Added new integration test contexts to verify:
    • The prefix is correctly applied to alertDisplayNameFormat when NamePrefix is set.
    • The prefix is not applied when NamePrefix is not set.
    • alertDescriptionFormat remains unchanged.
    • The conversion does not fail when alertDetailsOverride is absent.

Documentation:

  • Updated the README.md changelog to mention that NamePrefix now also prefixes alertDisplayNameFormat in alertDetailsOverride if present.…atinalertDetailsOverride` if present

@f-bader f-bader linked an issue Feb 24, 2026 that may be closed by this pull request
@f-bader
f-bader merged commit f55b627 into main Feb 24, 2026
3 checks passed
@f-bader
f-bader deleted the 40-modify-alertdisplaynameformat-when-nameprefix-is-set branch February 24, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Modify alertDisplayNameFormat when NamePrefix is set

1 participant