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

chore(j-s): Slack event when subpoena is serviced #16747

Merged
merged 8 commits into from
Nov 8, 2024

Conversation

unakb
Copy link
Member

@unakb unakb commented Nov 6, 2024

Slack event þegar fyrirkall er birt

What

Send a slack event when a subpoena's service status changes

Why

So we can see changes to subpoena service statuses

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • New Features

    • Introduced a new case event type for improved event logging.
    • Added a method to retrieve service status text for subpoenas.
    • Integrated event posting capabilities in the Subpoena service for tracking service status changes.
  • Bug Fixes

    • Enhanced error handling for unexpected affected rows during updates.
  • Chores

    • Updated module dependencies to include the EventModule for enhanced functionality.
    • Simplified guard logic in the Limited Access Subpoena Controller to allow optional subpoena existence.

@unakb unakb requested a review from a team as a code owner November 6, 2024 15:43
Copy link
Contributor

coderabbitai bot commented Nov 6, 2024

Walkthrough

The pull request introduces modifications to the EventService, Subpoena, and SubpoenaService classes. A new event type, SUBPOENA_SERVICE_STATUS, is added, along with enhancements to the postEvent method to accept an optional info parameter. A new method, getInfoText, is introduced for formatting this parameter. The Subpoena class gains a static method, serviceStatusText, for handling service status descriptions. The SubpoenaService integrates the EventService to post events when service statuses are updated. Additionally, the SubpoenaModule is updated to import the EventModule.

Changes

File Change Summary
apps/judicial-system/backend/src/app/modules/event/event.service.ts - Added SUBPOENA_SERVICE_STATUS to CaseEvent.
- Updated postEvent to include optional info parameter.
- Introduced getInfoText method for formatting info.
- Replaced extraText with courtDateText in postEvent.
- Simplified postErrorEvent using getInfoText.
apps/judicial-system/backend/src/app/modules/subpoena/models/subpoena.model.ts - Added static method serviceStatusText to return string based on ServiceStatus.
apps/judicial-system/backend/src/app/modules/subpoena/subpoena.module.ts - Imported EventModule into SubpoenaModule.
apps/judicial-system/backend/src/app/modules/subpoena/subpoena.service.ts - Injected EventService into SubpoenaService.
- Updated update method to post event when serviceStatus changes.
apps/judicial-system/backend/src/app/modules/subpoena/limitedAccessSubpoena.controller.ts - Removed SubpoenaExistsGuard from LimitedAccessSubpoenaController.
apps/judicial-system/backend/src/app/modules/subpoena/test/createTestingSubpoenaModule.ts - Added EventService to imports and providers in the testing module.
- Retrieved EventService instance from the compiled module.

Possibly related PRs

Suggested labels

high priority

Suggested reviewers

  • oddsson

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Outside diff range and nitpick comments (5)
apps/judicial-system/backend/src/app/modules/subpoena/subpoena.module.ts (1)

Missing test coverage for SubpoenaService event integration

The codebase lacks test coverage for the event integration in SubpoenaService. Specifically:

  • No dedicated test file exists for SubpoenaService (subpoena.service.spec.ts not found)
  • The service emits 'SUBPOENA_SERVICE_STATUS' events when service status changes, but this behavior is untested
  • Integration between SubpoenaService and EventService needs test coverage to ensure events are properly posted with correct parameters
🔗 Analysis chain

Line range hint 8-24: Tests needed for EventModule integration.

The integration between SubpoenaModule and EventModule for handling service status events should be covered by tests to ensure reliable functionality.

Let's check if there are any existing test files for this module:

Would you like me to help create test cases for:

  1. Event emission when subpoena service status changes
  2. Integration between SubpoenaService and EventService

Let me check if there are any tests covering the event integration by examining the test files and looking for event-related tests.


Let me check the actual event integration implementation to understand what needs to be tested.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Look for test files related to subpoena module
fd "subpoena.*\.spec\.ts" apps/judicial-system/backend/src

Length of output: 983


Script:

#!/bin/bash
# Check test files for event-related tests
for file in $(fd ".*\.spec\.ts" apps/judicial-system/backend/src/app/modules/subpoena/test); do
  echo "=== $file ==="
  rg -i "event" "$file"
done

# Also check the implementation to understand what events should be tested
rg -i "eventservice" apps/judicial-system/backend/src/app/modules/subpoena/

Length of output: 4334


Script:

#!/bin/bash
# Check the SubpoenaService implementation for event-related code
rg -A 5 "eventService" apps/judicial-system/backend/src/app/modules/subpoena/subpoena.service.ts

# Also check if there's a dedicated test file for SubpoenaService
fd "subpoena.service.spec.ts" apps/judicial-system/backend/src/app/modules/subpoena/

Length of output: 537

apps/judicial-system/backend/src/app/modules/subpoena/models/subpoena.model.ts (2)

24-36: Consider refactoring nested ternaries for better readability.

While the logic is correct, the nested ternary operators make the code harder to read and maintain.

Consider using a switch statement instead:

  static serviceStatusText(serviceStatus: ServiceStatus) {
-    return serviceStatus === ServiceStatus.DEFENDER
-      ? 'Birt fyrir verjanda'
-      : serviceStatus === ServiceStatus.ELECTRONICALLY
-      ? 'Birt rafrænt'
-      : serviceStatus === ServiceStatus.IN_PERSON
-      ? 'Birt persónulega'
-      : serviceStatus === ServiceStatus.FAILED
-      ? 'Árangurslaus birting'
-      : serviceStatus === ServiceStatus.EXPIRED
-      ? 'Rann út á tíma'
-      : 'Í birtingarferli' // This should never happen
+    switch (serviceStatus) {
+      case ServiceStatus.DEFENDER:
+        return 'Birt fyrir verjanda';
+      case ServiceStatus.ELECTRONICALLY:
+        return 'Birt rafrænt';
+      case ServiceStatus.IN_PERSON:
+        return 'Birt persónulega';
+      case ServiceStatus.FAILED:
+        return 'Árangurslaus birting';
+      case ServiceStatus.EXPIRED:
+        return 'Rann út á tíma';
+      default:
+        return 'Í birtingarferli'; // This should never happen
+    }
  }

24-36: Consider implementing internationalization.

The method contains hard-coded Icelandic strings. Consider implementing i18n to make the text strings maintainable and reusable across the application.

apps/judicial-system/backend/src/app/modules/event/event.service.ts (2)

90-95: Consider using a more specific type for the info parameter.

The current type { [key: string]: string | boolean | Date | undefined } is quite flexible but could benefit from a more specific interface to ensure type safety and better documentation.

Consider creating a dedicated interface:

interface EventInfo {
  serviceStatus?: string;
  updatedBy?: string;
  timestamp?: Date;
  // Add other known properties
}

Line range hint 123-137: Extract court date formatting logic to a separate method.

The court date text construction logic is complex and could be extracted to improve readability and maintainability.

Consider refactoring to:

private getCourtDateText(theCase: Case, event: CaseEvent): string {
  if (event !== 'SCHEDULE_COURT_DATE') {
    return '';
  }

  const courtDate = DateLog.courtDate(theCase.dateLogs)?.date ?? 
                    DateLog.arraignmentDate(theCase.dateLogs)?.date;
  
  return `\n>Dómari ${theCase.judge?.name ?? 'er ekki skráður'}
          \n>Dómritari ${theCase.registrar?.name ?? 'er ekki skráður'}
          \n>Fyrirtaka ${formatDate(courtDate, 'Pp') ?? 'er ekki skráð'}`;
}
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 3a971c5 and 3898da2.

📒 Files selected for processing (4)
  • apps/judicial-system/backend/src/app/modules/event/event.service.ts (8 hunks)
  • apps/judicial-system/backend/src/app/modules/subpoena/models/subpoena.model.ts (1 hunks)
  • apps/judicial-system/backend/src/app/modules/subpoena/subpoena.module.ts (2 hunks)
  • apps/judicial-system/backend/src/app/modules/subpoena/subpoena.service.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
apps/judicial-system/backend/src/app/modules/event/event.service.ts (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/subpoena/models/subpoena.model.ts (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/subpoena/subpoena.module.ts (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/subpoena/subpoena.service.ts (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
📓 Learnings (1)
apps/judicial-system/backend/src/app/modules/subpoena/models/subpoena.model.ts (2)
Learnt from: unakb
PR: island-is/island.is#16393
File: apps/judicial-system/digital-mailbox-api/src/app/modules/cases/models/subpoena.response.ts:164-169
Timestamp: 2024-10-14T21:34:16.234Z
Learning: Ensure that suggested code changes in `subpoena.response.ts` are accurate and necessary, avoiding redundant suggestions.
Learnt from: oddsson
PR: island-is/island.is#16645
File: apps/judicial-system/digital-mailbox-api/src/app/modules/cases/case.service.ts:99-108
Timestamp: 2024-11-01T13:43:42.392Z
Learning: In `case.service.ts`, the `fetchSubpoenaStatus` function checks if a service status has been set in the system and sets it if not. The status does not need to be used in the response.
🔇 Additional comments (5)
apps/judicial-system/backend/src/app/modules/subpoena/subpoena.module.ts (1)

8-8: LGTM! Clean implementation of EventModule integration.

The changes follow NestJS best practices with proper circular dependency handling using forwardRef.

Also applies to: 23-23

apps/judicial-system/backend/src/app/modules/subpoena/models/subpoena.model.ts (1)

35-35: Verify the default case handling.

The comment "This should never happen" suggests an impossible state, but the code still handles it. Could you clarify:

  1. Are there any other possible values for ServiceStatus?
  2. Should we throw an error in the default case instead?

Let's check the ServiceStatus enum definition:

✅ Verification successful

Let me check how this enum is being used in the subpoena model to understand the context better.


The default case is correctly handled and should be kept

The ServiceStatus enum is well-defined with all possible values: ELECTRONICALLY, DEFENDER, IN_PERSON, FAILED, and EXPIRED. The default case in serviceStatusText serves as a safety net for the following scenarios:

  • When serviceStatus is undefined/null (the column is nullable)
  • During enum value transitions in the database
  • For type safety in TypeScript

While the comment suggests it should never happen, having a default case is a good practice here. The text 'Í birtingarferli' (In service process) is an appropriate fallback.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Find and display the ServiceStatus enum definition
rg -A 10 "enum ServiceStatus" 

Length of output: 1296


Script:

#!/bin/bash
# Find where the ServiceStatus is used in the subpoena model
rg -B 5 -A 5 "ServiceStatus" apps/judicial-system/backend/src/app/modules/subpoena/models/subpoena.model.ts

Length of output: 1336

apps/judicial-system/backend/src/app/modules/event/event.service.ts (2)

65-65: LGTM: Event type addition follows established patterns.

The new SUBPOENA_SERVICE_STATUS event type is well-integrated with appropriate emoji and description.

Also applies to: 79-79


90-95: Verify integration with SubpoenaService.

Let's ensure that the EventService is properly integrated with the SubpoenaService for posting subpoena status events.

Also applies to: 199-212

✅ Verification successful

Based on the shell script results, I can see that:

  1. The EventService is properly injected in SubpoenaService's constructor (line 73)
  2. The EventService is used to post events for subpoena service status changes (lines 249-254)
  3. The event type 'SUBPOENA_SERVICE_STATUS' is properly defined in EventService (line 1 of event.service.ts)

Let me verify one more aspect to ensure complete integration:


Let me try a different approach to verify the Slack integration:


Integration with SubpoenaService is properly implemented

The verification confirms that:

  • EventService is correctly injected in SubpoenaService
  • The 'SUBPOENA_SERVICE_STATUS' event is properly posted when subpoena status changes
  • The event is configured in EventService with the appropriate Slack emoji and message format
  • The integration follows the same pattern as other event types in the system

The changes are well-integrated and maintain consistency with the existing event handling patterns in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify EventService integration in SubpoenaService

# Test 1: Check if EventService is imported and injected in SubpoenaService
echo "Checking EventService integration..."
ast-grep --pattern 'class SubpoenaService {
  constructor($$$) {
    $$$
  }
  $$$
}'

# Test 2: Check if postEvent is called with SUBPOENA_SERVICE_STATUS
echo "Checking event posting..."
rg -A 5 "SUBPOENA_SERVICE_STATUS" --type ts

Length of output: 32281


Script:

#!/bin/bash
# Check if the event is properly handled in the Slack integration
rg -A 5 "postEvent.*SUBPOENA_SERVICE_STATUS" --type ts

Length of output: 56


Script:

#!/bin/bash
# Check for Slack event handling configuration
echo "Checking Slack integration..."
rg -A 5 "SUBPOENA_SERVICE_STATUS.*:page_with_curl:" --type ts

# Check event handling in general
echo "Checking event handling..."
ast-grep --pattern 'async postEvent(event: $_) {
  $$$
}'

Length of output: 881

apps/judicial-system/backend/src/app/modules/subpoena/subpoena.service.ts (1)

35-35: LGTM: Clean dependency injection implementation.

The EventService integration follows the established patterns for service imports and dependency injection.

Also applies to: 73-73

@datadog-island-is
Copy link

datadog-island-is bot commented Nov 6, 2024

Datadog Report

Branch report: j-s/slack-success-event
Commit report: d48bbf8
Test service: judicial-system-web

✅ 0 Failed, 333 Passed, 0 Skipped, 56.44s Total Time
➡️ Test Sessions change in coverage: 1 no change

Copy link
Member

@oddsson oddsson left a comment

Choose a reason for hiding this comment

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

Nice 🙌

@oddsson oddsson added the automerge Merge this PR as soon as all checks pass label Nov 7, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 92060ce and ca02d03.

📒 Files selected for processing (2)
  • apps/judicial-system/backend/src/app/modules/subpoena/limitedAccessSubpoena.controller.ts (1 hunks)
  • apps/judicial-system/backend/src/app/modules/subpoena/test/createTestingSubpoenaModule.ts (4 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
apps/judicial-system/backend/src/app/modules/subpoena/limitedAccessSubpoena.controller.ts (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/subpoena/test/createTestingSubpoenaModule.ts (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
📓 Learnings (2)
apps/judicial-system/backend/src/app/modules/subpoena/limitedAccessSubpoena.controller.ts (1)
Learnt from: oddsson
PR: island-is/island.is#16463
File: apps/judicial-system/backend/src/app/modules/subpoena/test/limitedAccessSubpoenaController/limitedAccessSubpoenaControllerGuards.spec.ts:17-17
Timestamp: 2024-10-21T21:14:47.668Z
Learning: In `LimitedAccessSubpoenaController`, `SubpoenaExistsOptionalGuard` is still used on specific endpoints not covered by the test file `limitedAccessSubpoenaControllerGuards.spec.ts`.
apps/judicial-system/backend/src/app/modules/subpoena/test/createTestingSubpoenaModule.ts (1)
Learnt from: unakb
PR: island-is/island.is#16747
File: apps/judicial-system/backend/src/app/modules/subpoena/subpoena.service.ts:0-0
Timestamp: 2024-11-06T16:08:25.635Z
Learning: Error handling and asynchronous handling are already managed within the `EventService.postEvent` method in `event.service.ts`.
🔇 Additional comments (3)
apps/judicial-system/backend/src/app/modules/subpoena/limitedAccessSubpoena.controller.ts (2)

Line range hint 41-48: LGTM: Robust security implementation with proper guard layering.

The controller implements a comprehensive security model:

  1. Authentication via JwtAuthGuard
  2. Resource validation through CaseExistsGuard and DefendantExistsGuard
  3. Role-based access control with RolesGuard
  4. Type-specific validation using CaseTypeGuard
  5. Read permission verification through CaseReadGuard

The PDF endpoint is well-protected and properly documented with Swagger annotations.

Also applies to: 52-83


35-35: Verify the impact of using SubpoenaExistsOptionalGuard.

The change from SubpoenaExistsGuard to SubpoenaExistsOptionalGuard makes the subpoena existence check optional. While this aligns with the PR's objective to handle service status changes, we should verify that this doesn't introduce security risks.

Let's verify the usage and impact:

✅ Verification successful

Let me gather more information about the usage of these guards to verify the impact.


Let me gather more information about the implementation of these guards to understand their relationship and usage.


Let me check the actual implementation of these guards to understand their behavior.


The change to use SubpoenaExistsOptionalGuard is appropriate and safe

The implementation shows that SubpoenaExistsOptionalGuard is a proper extension of SubpoenaExistsGuard that simply makes the subpoena ID parameter optional. When no subpoena ID is provided, it allows the request to proceed. When a subpoena ID is provided, it performs the same validation as the parent guard.

This aligns with the endpoint's purpose:

  • The PDF endpoint accepts an optional subpoena ID
  • When provided, it validates the subpoena exists
  • When not provided, it allows the request to proceed
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Analyze the usage of SubpoenaExistsGuard vs SubpoenaExistsOptionalGuard

# Test 1: Check if SubpoenaExistsGuard is still used elsewhere
echo "Checking SubpoenaExistsGuard usage:"
rg "SubpoenaExistsGuard" -A 3

# Test 2: Check other endpoints using SubpoenaExistsOptionalGuard
echo "Checking SubpoenaExistsOptionalGuard usage:"
rg "SubpoenaExistsOptionalGuard" -A 3

# Test 3: Check for potential security implications in test files
echo "Checking related test coverage:"
rg "SubpoenaExists.*Guard.*test|spec" --type ts

Length of output: 152353


Script:

#!/bin/bash
# Check the implementation of SubpoenaExistsOptionalGuard
ast-grep --pattern 'export class SubpoenaExistsOptionalGuard {
  $$$
}'

# Check where SubpoenaExistsOptionalGuard is used
rg "SubpoenaExistsOptionalGuard" -A 3 -B 3

# Check test coverage
rg "SubpoenaExistsOptionalGuard.*test|spec" --type ts

Length of output: 148974


Script:

#!/bin/bash
# Check the implementation of both guards
ast-grep --pattern 'export class SubpoenaExistsGuard {
  $$$
}'

# Check the implementation of the optional guard
ast-grep --pattern 'export class SubpoenaExistsOptionalGuard extends SubpoenaExistsGuard {
  $$$
}'

# Check where these guards are used in controllers
rg "@UseGuards.*SubpoenaExists.*Guard" -A 3 -B 3

Length of output: 5072


Script:

#!/bin/bash
# Get the full implementation of the guards
cat apps/judicial-system/backend/src/app/modules/subpoena/guards/subpoenaExists.guard.ts

# Check if there are any tests that verify the behavior
rg -l "describe.*SubpoenaExists.*Guard" --type ts

Length of output: 1694

apps/judicial-system/backend/src/app/modules/subpoena/test/createTestingSubpoenaModule.ts (1)

17-17: LGTM! EventService setup looks good.

The EventService is properly imported, mocked, and provided in the testing module, following the existing patterns in the file.

Also applies to: 32-32, 51-51

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 29.41176% with 24 lines in your changes missing coverage. Please review.

Project coverage is 36.55%. Comparing base (e552b2d) to head (7f3c526).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../src/app/modules/subpoena/models/subpoena.model.ts 0.00% 12 Missing ⚠️
...tem/backend/src/app/modules/event/event.service.ts 38.46% 8 Missing ⚠️
...ackend/src/app/modules/subpoena/subpoena.module.ts 0.00% 2 Missing ⚠️
...ckend/src/app/modules/subpoena/subpoena.service.ts 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16747      +/-   ##
==========================================
- Coverage   36.55%   36.55%   -0.01%     
==========================================
  Files        6892     6892              
  Lines      143782   143810      +28     
  Branches    40974    40986      +12     
==========================================
+ Hits        52556    52564       +8     
- Misses      91226    91246      +20     
Flag Coverage Δ
judicial-system-web 27.55% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...dules/subpoena/limitedAccessSubpoena.controller.ts 100.00% <100.00%> (ø)
...dules/subpoena/test/createTestingSubpoenaModule.ts 100.00% <100.00%> (ø)
...ackend/src/app/modules/subpoena/subpoena.module.ts 0.00% <0.00%> (ø)
...ckend/src/app/modules/subpoena/subpoena.service.ts 26.66% <50.00%> (+0.92%) ⬆️
...tem/backend/src/app/modules/event/event.service.ts 33.89% <38.46%> (+2.52%) ⬆️
.../src/app/modules/subpoena/models/subpoena.model.ts 57.89% <0.00%> (-26.73%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e552b2d...7f3c526. Read the comment docs.

@kodiakhq kodiakhq bot merged commit 4cc1e8b into main Nov 8, 2024
31 checks passed
@kodiakhq kodiakhq bot deleted the j-s/slack-success-event branch November 8, 2024 11:44
jonnigs pushed a commit that referenced this pull request Nov 12, 2024
* chore(j-s): Post event to slack when subpoena status updates

* chore(j-s): Slack event when service status changes

* chore: nx format:write update dirty files

* fix(j-s): Mock event service

* Update createTestingSubpoenaModule.ts

---------

Co-authored-by: andes-it <builders@andes.is>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants