feat: Add workflow trigger for incident called 'alert_association_changed'
Closes #5253
📑 Description
This PR adds a new workflow trigger event for incident called "alert_association_changed". This helps user configure workflows that trigger whenever incident alert association changes.
Following events cause the incident alert association to change:
- Alert addition/linkage to an incident
- Alert unlinking from an incident.
Whenever this event takes place, an additional key called "linked_alerts" is added to the incident object that's passed to the workflow. The linked_alerts key is basically a list of alert strings currently linked to the incident sorted in descending order of timestamp. Each alert string present in the list is of the following form: {status} {lastReceived} [{severity}] {description} e.g. Firing 2025-01-30T10:00:00.000Z [high] Test alert 1 description
✅ Checks
- [x] My pull request adheres to the code style of this project
- [ ] My code requires changes to the documentation
- [ ] I have updated the documentation as required
- [ ] All the tests have passed
@dvora-ns is attempting to deploy a commit to the KeepHQ Team on Vercel.
A member of the Team first needs to authorize it.
Codecov Report
:x: Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 30.70%. Comparing base (74e4c9f) to head (d7f7b2f).
:warning: Report is 2 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #5254 +/- ##
==========================================
- Coverage 30.73% 30.70% -0.04%
==========================================
Files 101 101
Lines 11494 11511 +17
==========================================
+ Hits 3533 3534 +1
- Misses 7961 7977 +16
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.