Skip to content

Conversation

rowanseymour
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings September 1, 2025 20:38
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 updates ticket event creation to accept an explicit UUID parameter instead of generating one internally, enabling legacy ticket opened events to use the engine event UUID for consistency.

Key changes:

  • Modified all ticket event constructor functions to accept a flows.EventUUID parameter
  • Updated ticket opened event creation to use the engine event's UUID from the flow event
  • Restructured the ticket hook to pass the entire flow event instead of just the note

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
core/models/ticket_event.go Updated constructor functions to accept UUID parameter instead of generating internally
core/models/ticket_event_test.go Updated test cases to provide explicit UUIDs and add UUID assertions
core/runner/hooks/insert_tickets.go Modified to store and use flow events for UUID extraction
core/runner/handlers/ticket_opened.go Updated to pass entire event object instead of just note
core/models/ticket.go Updated all ticket event creation calls to generate UUIDs
core/tasks/realtime/ctasks/ticket_closed_test.go Updated test to provide UUID parameter
core/models/notification_test.go Updated test helper to provide UUID parameter

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

@@ -1647,19 +1647,19 @@
},
"events": [
{
"uuid": "01969b47-76cb-76f8-ba91-c48ad8c50e6b",
Copy link
Member Author

Choose a reason for hiding this comment

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

we're calling uuids.NewV7 one less time

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 68.18182% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.88%. Comparing base (e295747) to head (832e4f2).

Files with missing lines Patch % Lines
core/runner/hooks/insert_tickets.go 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #774      +/-   ##
==========================================
- Coverage   50.88%   50.88%   -0.01%     
==========================================
  Files         253      253              
  Lines       15197    15198       +1     
==========================================
  Hits         7733     7733              
- Misses       6661     6662       +1     
  Partials      803      803              

☔ 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 7be2edb into main Sep 1, 2025
5 checks passed
@rowanseymour rowanseymour deleted the ticket_opened_legacy branch September 1, 2025 21:06
@github-actions github-actions bot locked and limited conversation to collaborators Sep 1, 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