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

feature: Configuration variable editor (WIP) #449

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jamesread
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Nov 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitroom ❌ Failed (Inspect) Nov 26, 2024 0:32am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
postiz ⬜️ Ignored (Inspect) Nov 26, 2024 0:32am

@@ -14,6 +14,7 @@
import { useSWRConfig } from 'swr';
import clsx from 'clsx';
import { TeamsComponent } from '@gitroom/frontend/components/settings/teams.component';
import { IntegretionTags } from '@gitroom/frontend/components/settings/integration-tags.component';

Check warning

Code scanning / ESLint

Disallow unused variables Warning

'IntegretionTags' is defined but never used.

Copilot Autofix AI about 3 hours ago

To fix the problem, we need to remove the unused import statement for IntegretionTags. This will resolve the ESLint error and clean up the code. The change should be made in the file apps/frontend/src/components/layout/settings.component.tsx by deleting the line that imports IntegretionTags.

Suggested changeset 1
apps/frontend/src/components/layout/settings.component.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/apps/frontend/src/components/layout/settings.component.tsx b/apps/frontend/src/components/layout/settings.component.tsx
--- a/apps/frontend/src/components/layout/settings.component.tsx
+++ b/apps/frontend/src/components/layout/settings.component.tsx
@@ -16,3 +16,2 @@
 import { TeamsComponent } from '@gitroom/frontend/components/settings/teams.component';
-import { IntegretionTags } from '@gitroom/frontend/components/settings/integration-tags.component';
 import { useUser } from '@gitroom/frontend/components/layout/user.context';
EOF
@@ -16,3 +16,2 @@
import { TeamsComponent } from '@gitroom/frontend/components/settings/teams.component';
import { IntegretionTags } from '@gitroom/frontend/components/settings/integration-tags.component';
import { useUser } from '@gitroom/frontend/components/layout/user.context';
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
import { useMemo } from 'react';
import { classValidatorResolver } from '@hookform/resolvers/class-validator';
import { SaveConfigurationVariableDto, SaveConfigurationVariablesDto } from '@gitroom/nestjs-libraries/dtos/settings/configuration-variables.dto.ts';

Check warning

Code scanning / ESLint

Disallow unused variables Warning

'SaveConfigurationVariablesDto' is defined but never used.

Copilot Autofix AI about 3 hours ago

To fix the problem, we need to remove the unused import SaveConfigurationVariablesDto from the file apps/frontend/src/components/settings/configuration-variable-editor.component.tsx. This will resolve the ESLint error and clean up the code.

  • Locate the import statement on line 7.
  • Remove the SaveConfigurationVariablesDto from the import statement.
Suggested changeset 1
apps/frontend/src/components/settings/configuration-variable-editor.component.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/apps/frontend/src/components/settings/configuration-variable-editor.component.tsx b/apps/frontend/src/components/settings/configuration-variable-editor.component.tsx
--- a/apps/frontend/src/components/settings/configuration-variable-editor.component.tsx
+++ b/apps/frontend/src/components/settings/configuration-variable-editor.component.tsx
@@ -6,3 +6,3 @@
 import { classValidatorResolver } from '@hookform/resolvers/class-validator';
-import { SaveConfigurationVariableDto, SaveConfigurationVariablesDto } from '@gitroom/nestjs-libraries/dtos/settings/configuration-variables.dto.ts';
+import { SaveConfigurationVariableDto } from '@gitroom/nestjs-libraries/dtos/settings/configuration-variables.dto.ts';
 
EOF
@@ -6,3 +6,3 @@
import { classValidatorResolver } from '@hookform/resolvers/class-validator';
import { SaveConfigurationVariableDto, SaveConfigurationVariablesDto } from '@gitroom/nestjs-libraries/dtos/settings/configuration-variables.dto.ts';
import { SaveConfigurationVariableDto } from '@gitroom/nestjs-libraries/dtos/settings/configuration-variables.dto.ts';

Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options

const form = useForm({ resolver, values: { message: '' } });

const { data, mutate } = useFetch(`/configuration-variables/all`);

Check warning

Code scanning / ESLint

Disallow unused variables Warning

'data' is assigned a value but never used.

Copilot Autofix AI about 3 hours ago

To fix the problem, we need to remove the unused data variable from the code. This involves modifying the line where data is destructured from the useFetch hook. We will only keep the mutate function, which is actually used in the submit function.

Suggested changeset 1
apps/frontend/src/components/settings/configuration-variable-editor.component.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/apps/frontend/src/components/settings/configuration-variable-editor.component.tsx b/apps/frontend/src/components/settings/configuration-variable-editor.component.tsx
--- a/apps/frontend/src/components/settings/configuration-variable-editor.component.tsx
+++ b/apps/frontend/src/components/settings/configuration-variable-editor.component.tsx
@@ -48,3 +48,3 @@
 
-  const { data, mutate } = useFetch(`/configuration-variables/all`);
+  const { mutate } = useFetch(`/configuration-variables/all`);
 
EOF
@@ -48,3 +48,3 @@

const { data, mutate } = useFetch(`/configuration-variables/all`);
const { mutate } = useFetch(`/configuration-variables/all`);

Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant