-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
fix: clone feature toggle should not copy createdAt #6442
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
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.
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 1 findings(s) 🚩
- Improving Code Health: 0 findings(s) ✅
- Affected Hotspots: 2 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
🚩 Declining Code Health (highest to lowest):
@@ -1324,6 +1324,7 @@ class FeatureToggleService { | |||
...cToggle, | |||
name: newFeatureName, | |||
variants: undefined, | |||
createdAt: undefined, |
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.
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1983 to 1984, improve code health by reducing it to 1000
Why does this problem occur?
The number of Lines of Code in a single file. More Lines of Code lowers the code health. Read more.
@@ -1324,6 +1324,7 @@ class FeatureToggleService { | |||
...cToggle, | |||
name: newFeatureName, | |||
variants: undefined, | |||
createdAt: undefined, |
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.
❌ Getting worse: Large Method
FeatureToggleService.cloneFeatureToggle increases from 77 to 78 lines of code, threshold = 70
Why does this problem occur?
Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function. Read more.
To ignore this warning click here.
@@ -2191,6 +2191,42 @@ test('should clone feature toggle without replacing groupId', async () => { | |||
}); | |||
}); | |||
|
|||
test('should clone feature toggle WITHOUT createdAt field', async () => { |
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.
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 3119 to 3152, improve code health by reducing it to 1000
Why does this problem occur?
The number of Lines of Code in a single file. More Lines of Code lowers the code health. Read more.
@@ -2191,6 +2191,42 @@ test('should clone feature toggle without replacing groupId', async () => { | |||
}); | |||
}); | |||
|
|||
test('should clone feature toggle WITHOUT createdAt field', async () => { |
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.
ℹ Getting worse: Number of Functions in a Single Module
The number of functions increases from 104 to 105, threshold = 75
Why does this problem occur?
This file contains too many functions. Beyond a certain threshold, more functions lower the code health. Read more.
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.
Looks good!
This is a small fix to avoid that cloning a feature toggle also clones the "createdAt" field, which does not make sense.
fixes: #6426