Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Refactor incident status change logic to incident_bl. #4009

Conversation

VladimirFilonov
Copy link
Contributor

Separated the incident status change functionality into a dedicated method within incident_bl for improved modularity and readability. This reduces redundancy in routes/incidents.py and centralizes the business logic for incident handling. Additionally, adjusted enrichment metadata retrieval and added necessary imports for consistency.

Closes #4000

📑 Description

✅ Checks

  • 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

ℹ Additional Information

Separated the incident status change functionality into a dedicated method within `incident_bl` for improved modularity and readability. This reduces redundancy in `routes/incidents.py` and centralizes the business logic for incident handling. Additionally, adjusted enrichment metadata retrieval and added necessary imports for consistency.
Copy link

vercel bot commented Mar 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
keep ⬜️ Ignored (Inspect) Visit Preview Mar 13, 2025 8:16am

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 13, 2025
Replaced the `change_by` parameter type with `AuthenticatedEntity` in the `change_status` method to improve type consistency and clarity. Removed unused `datetime` import for cleaner code.
Copy link
Contributor

@Matvey-Kuk Matvey-Kuk left a comment

Choose a reason for hiding this comment

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

<3

@VladimirFilonov VladimirFilonov merged commit 78cb9ed into main Mar 13, 2025
14 of 19 checks passed
@VladimirFilonov VladimirFilonov deleted the fix/4000-bug-incident-status-change-does-not-trigger-workflows branch March 13, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Incident status change does not trigger workflows
2 participants