Skip to content

Conversation

rowanseymour
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings September 1, 2025 23:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reworks the ticket notification system to use hooks instead of handling notifications directly in the ticket insertion process. The change moves notification logic from the insert_tickets hook to the ticket_opened handler, providing better separation of concerns and more granular control over when notifications are created.

Key changes:

  • Moved notification creation logic from insert_tickets hook to ticket_opened handler
  • Updated goflow dependency to version 0.255.1
  • Refactored notification helper functions and removed obsolete test code

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
go.mod Updates goflow dependency to version 0.255.1
core/runner/hooks/insert_tickets.go Removes notification creation logic from ticket insertion hook
core/runner/handlers/ticket_opened.go Adds notification logic using InsertNotifications hook
core/models/notification_test.go Removes obsolete test for ticket notifications
core/models/notification.go Refactors notification functions and fixes typo in variable name

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@@ -85,28 +86,18 @@ func NotifyIncidentStarted(ctx context.Context, db DBorTx, oa *OrgAssets, incide
return InsertNotifications(ctx, db, notifications)
}

var ticketAssignableToles = []UserRole{UserRoleAdministrator, UserRoleEditor, UserRoleAgent}
var ticketAssignableRoles = []UserRole{UserRoleAdministrator, UserRoleEditor, UserRoleAgent}
Copy link
Preview

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

Fixed typo in variable name from 'ticketAssignableToles' to 'ticketAssignableRoles'.

Copilot uses AI. Check for mistakes.

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 50.00000% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.66%. Comparing base (f322b8c) to head (4de93ad).

Files with missing lines Patch % Lines
core/models/notification.go 8.33% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #776      +/-   ##
==========================================
- Coverage   50.74%   50.66%   -0.09%     
==========================================
  Files         256      256              
  Lines       15220    15211       -9     
==========================================
- Hits         7723     7706      -17     
- Misses       6696     6704       +8     
  Partials      801      801              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rowanseymour rowanseymour merged commit 142a24d into main Sep 2, 2025
5 checks passed
@rowanseymour rowanseymour deleted the ticket_open_notifications branch September 2, 2025 14:08
@github-actions github-actions bot locked and limited conversation to collaborators Sep 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants