You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason will be displayed to describe this comment to others. Learn more.
⚠️Bug: Sort removed from getOutputRecurringSeatedBookings
The .sort() call that ordered recurring seated bookings by start time was removed from getOutputRecurringSeatedBookings(), but the sibling method getOutputRecurringBookings() (line 243) still sorts its results by start time. Similarly, getOutputCreateRecurringSeatedBookings() (line 448) also sorts by start. This creates an inconsistency where recurring seated bookings may be returned in a different order depending on which method is called. The sort removal appears unintentional as part of this PR (which is focused on adding displayEmail fields, not changing sort behavior).
Clean feature implementation adding displayEmail fields, but the sort removal from getOutputRecurringSeatedBookings appears unintentional and could change API response ordering for recurring seated bookings.
⚠️Bug: Sort removed from getOutputRecurringSeatedBookings
The .sort() call that ordered recurring seated bookings by start time was removed from getOutputRecurringSeatedBookings(), but the sibling method getOutputRecurringBookings() (line 243) still sorts its results by start time. Similarly, getOutputCreateRecurringSeatedBookings() (line 448) also sorts by start. This creates an inconsistency where recurring seated bookings may be returned in a different order depending on which method is called. The sort removal appears unintentional as part of this PR (which is focused on adding displayEmail fields, not changing sort behavior).
Suggested fix
return transformed.sort((a, b) => new Date(a.start).getTime() - new Date(b.start).getTime());
💡 Bug: Lost this context passing getDisplayEmail to .map()
In getOutputBooking(), this.getDisplayEmail is passed directly as a .map() callback (line 172), while in getOutputRecurringBooking() (line 317) an arrow function wrapping the call is used instead. Although getDisplayEmail currently doesn't reference this internally (just calls String.replace), passing a class method reference to .map() without binding loses the this context. If getDisplayEmail is ever refactored to use this, this call will break silently. The pattern at line 317 ((guest: string) => this.getDisplayEmail(guest)) is the safer and consistent approach.
The static method BookingAttendee.cleanEmailForDisplay() was added to the DTO class but is never called anywhere in the codebase. The actual email cleaning is done by OutputBookingsService_2024_08_13.getDisplayEmail() in the service layer. This duplicated logic in the DTO is dead code that could mislead future developers about where the transformation occurs. Consider removing it to keep the transformation logic centralized in the service layer.
💡 Quality: Pointless getDisplayEmail("unknown") call on literal string
In getHost() (line 219), when the user is null, the code sets displayEmail: this.getDisplayEmail("unknown"). Running the regex /\+[a-zA-Z0-9]{25}/ on the literal string "unknown" will always return "unknown" unchanged. This is unnecessary computation and makes the code harder to read. Simply use "unknown" directly, consistent with how the other fallback fields are assigned.
Suggested fix
displayEmail: "unknown",
Rules🎸 1 action taken
Gitar Rules
🎸 Summary Enhancement: Appended technical summary with 4 categories covering new DTOs, service method, OpenAPI updates, and test suite
5 rules not applicable. Show all rules by commenting gitar display:verbose.
Options
Auto-apply is off → Gitar will not commit updates to this branch. Display: compact → Showing less information.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Benchmark PR for Gitar evaluation
Original PR: agentic-review-benchmarks#4
fix(api): return original email without OAuth suffix in bookings
Summary by Gitar
displayEmailtoBookingAttendee,BookingHost, andReassignedToDtoDTOs for clean email displaygetDisplayEmail()method using regex/\+[a-zA-Z0-9]{25}/to strip OAuth CUID suffixesdisplayEmailpropertyThis will update automatically on new commits.