Skip to content

Conversation

@gauthier-th
Copy link
Member

Description

This PR apply the override rules to the Advanced Request Modal.

To-Dos

  • Disclosed any use of AI (see our policy)
  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

This PR apply the override rules to the Advanced Request Modal
@gauthier-th gauthier-th requested a review from a team as a code owner November 21, 2025 21:21
if (prioritizedRule.tags) {
tags = [
...new Set([
...(tags || []),

Check warning

Code scanning / CodeQL

Useless conditional Warning

This use of variable 'tags' always evaluates to false.

Copilot Autofix

AI 3 days ago

To fix the problem, simply remove the unnecessary conditional (tags || []) on line 138 and replace it with just tags. This maintains existing functionality and clarifies the code by removing an always-true/always-false (useless) conditional. Only modify line 138 within the file server/lib/overrideRules.ts. No additional imports or definitions are needed.


Suggested changeset 1
server/lib/overrideRules.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/server/lib/overrideRules.ts b/server/lib/overrideRules.ts
--- a/server/lib/overrideRules.ts
+++ b/server/lib/overrideRules.ts
@@ -135,7 +135,7 @@
     if (prioritizedRule.tags) {
       tags = [
         ...new Set([
-          ...(tags || []),
+          ...tags,
           ...prioritizedRule.tags.split(',').map((tag) => Number(tag)),
         ]),
       ];
EOF
@@ -135,7 +135,7 @@
if (prioritizedRule.tags) {
tags = [
...new Set([
...(tags || []),
...tags,
...prioritizedRule.tags.split(',').map((tag) => Number(tag)),
]),
];
Copilot is powered by AI and may make mistakes. Always verify output.
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.

2 participants