-
Notifications
You must be signed in to change notification settings - Fork 46k
feat: Add status check for project json files in git folder #20369
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
base: master
Are you sure you want to change the base?
feat: Add status check for project json files in git folder #20369
Conversation
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.
1 issue found across 6 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="packages/cli/src/environments.ee/source-control/source-control-import.service.ee.ts">
<violation number="1" location="packages/cli/src/environments.ee/source-control/source-control-import.service.ee.ts:614">
Rule violated: **Prefer Typeguards over Type casting**
Avoid narrowing project.type with an `as` cast here; return the literal `'team'` (or use a guard) to comply with the “Prefer Typeguards over Type casting” rule.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
description: project.description, | ||
icon: project.icon, | ||
filename: getProjectExportPath(project.id, this.projectExportFolder), | ||
type: project.type as 'team', // This is safe because we only select team projects |
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.
Rule violated: Prefer Typeguards over Type casting
Avoid narrowing project.type with an as
cast here; return the literal 'team'
(or use a guard) to comply with the “Prefer Typeguards over Type casting” rule.
Prompt for AI agents
Address the following comment on packages/cli/src/environments.ee/source-control/source-control-import.service.ee.ts at line 614:
<comment>Avoid narrowing project.type with an `as` cast here; return the literal `'team'` (or use a guard) to comply with the “Prefer Typeguards over Type casting” rule.</comment>
<file context>
@@ -523,6 +531,95 @@ export class SourceControlImportService {
+ description: project.description,
+ icon: project.icon,
+ filename: getProjectExportPath(project.id, this.projectExportFolder),
+ type: project.type as 'team', // This is safe because we only select team projects
+ owner: {
+ type: 'team',
</file context>
type: project.type as 'team', // This is safe because we only select team projects | |
type: 'team', // This is safe because we only select team projects |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary
Related Linear tickets, Github issues, and Community forum posts
resolves PAY-3897
Review / Merge checklist
release/backport
(if the PR is an urgent fix that needs to be backported)