-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat(auth-admin): Delegation reference id #15932
Conversation
WalkthroughThis pull request introduces a migration that modifies the Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15932 +/- ##
==========================================
- Coverage 36.81% 36.71% -0.11%
==========================================
Files 6721 6721
Lines 137870 138263 +393
Branches 39197 39399 +202
==========================================
+ Hits 50755 50761 +6
- Misses 87115 87502 +387
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 72 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 15 Total Test Services: 0 Failed, 15 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (2) |
There was a problem hiding this 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
Files selected for processing (3)
- libs/auth-api-lib/migrations/20240910092516-delegation-reference-id.js (1 hunks)
- libs/auth-api-lib/src/lib/delegations/dto/delegation.dto.ts (1 hunks)
- libs/auth-api-lib/src/lib/delegations/models/delegation.model.ts (1 hunks)
Additional context used
Path-based instructions (3)
libs/auth-api-lib/migrations/20240910092516-delegation-reference-id.js (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/auth-api-lib/src/lib/delegations/dto/delegation.dto.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/auth-api-lib/src/lib/delegations/models/delegation.model.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Biome
libs/auth-api-lib/migrations/20240910092516-delegation-reference-id.js
[error] 1-1: Redundant use strict directive.
The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it.
Safe fix: Remove the redundant use strict directive.(lint/suspicious/noRedundantUseStrict)
Additional comments not posted (4)
libs/auth-api-lib/migrations/20240910092516-delegation-reference-id.js (2)
4-11
: LGTM!The code changes in the
up
function are approved.
13-17
: LGTM!The code changes in the
down
function are approved.libs/auth-api-lib/src/lib/delegations/dto/delegation.dto.ts (1)
66-69
: LGTM!The addition of the optional
referenceId
property to theDelegationDTO
class is well-implemented and properly annotated with validation decorators. This enhancement allows for an optional reference identifier to be associated with delegations, providing flexibility in tracking or linking delegations without enforcing a strict requirement.The code changes are approved.
libs/auth-api-lib/src/lib/delegations/models/delegation.model.ts (1)
83-87
: LGTM!The addition of the optional
referenceId
property to theDelegation
class is a good enhancement to the data model. It provides a new field that can be utilized for referencing purposes, potentially improving the flexibility and functionality of the delegation records.The property is correctly defined using the
@Column
decorator with appropriate type (DataType.STRING
) andallowNull
option set totrue
, allowing null values.The existing logic and control flow of the class remain unchanged, as the new property does not affect any existing methods or properties.
The code changes are approved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add a unique constraint to the referenceId
column. But here we need to allow multiple null values so we are NOT using NULLS NOT DISTINCT
like we are doing on the DelegationModel.domain
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
What
Add
referenceId
to thedelegation
tableWhy
So we can reference a ZenDesk Id when a paper delegation is registered
Screenshots / Gifs
Attach Screenshots / Gifs to help reviewers understand the scope of the pull request
Checklist:
Summary by CodeRabbit
New Features
referenceId
property to delegation records, enhancing tracking and linking capabilities.reference_id
column in thedelegation
table, allowing for improved data management.Bug Fixes
reference_id
column maintains database integrity.