Skip to content

chore(backend): fix GuildAutomationExecutionService lint errors - #690

Merged
LucasSantana-Dev merged 9 commits into
mainfrom
chore/lint-guild-automation
Apr 17, 2026
Merged

LucasSantana-Dev merged 9 commits into
mainfrom
chore/lint-guild-automation

Conversation

@LucasSantana-Dev

@LucasSantana-Dev LucasSantana-Dev commented Apr 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Fixed 101 eslint errors in GuildAutomationExecutionService.ts
  • Added proper type assertions for Promise.all destructuring (with explicit tuple type)
  • Extracted manifest building logic to private helper method to reduce cyclomatic complexity (17 → acceptable)
  • Wrapped builder parameters in data object to meet max-params rule (13 → 1)

Test plan

  • Full eslint lint passes (0 errors, 0 warnings)
  • GuildAutomationExecutionService unit tests pass (28/28)
  • No new errors introduced in other files

Error count before: 101
Error count after: 0

Summary by CodeRabbit

  • Tests

    • Extended test coverage for guild automation functionality, including reaction roles, exclusive roles, and utility functions.
  • Refactor

    • Improved internal type safety and refactored guild automation manifest construction for enhanced reliability.

@vercel

vercel Bot commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lucky Ready Ready Preview, Comment Apr 17, 2026 10:16pm

Request Review

@coderabbitai

coderabbitai Bot commented Apr 17, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

GuildAutomationExecutionService refactored to export eight utility functions and restructure type handling with explicit narrowing casts. Imports updated to use new guild automation types, local-only types removed, and a private buildGuildAutomationManifest method introduced. Test coverage extended with 398 lines covering reaction roles, exclusive roles, and exported utilities.

Changes

Cohort / File(s) Summary
Service refactoring and exports
packages/backend/src/services/GuildAutomationExecutionService.ts
Updated imports to replace RoleGrant with GuildAutomationRole, GuildAutomationChannel, and GuildAutomationParity types. Exported 8 utility functions (normalizeName, asObject, toAutoModPayload, toModerationPayload, isExpectedDeleteError, isOnboardingUnavailable, mapChannelType, toDiscordChannelType). Removed locally-declared types (ReactionRoleMessageMapping, ReactionRoleMessage, RoleExclusion). Added explicit type narrowing casts in upsertAutoMessage and applyReactionRoleRules. Introduced private buildGuildAutomationManifest method to construct manifest from loosely-typed inputs.
Test coverage expansion
packages/backend/tests/unit/services/GuildAutomationExecutionService.test.ts
Extended unit tests with 398 new lines covering reaction-role message capture, exclusive role rule aggregation, optional field handling, command access grant mapping, automessage field normalization, and direct testing of newly exported utilities and GuildAutomationExecutionError class.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title describes a lint-fixing effort, but the changeset includes significant refactoring: extracting manifest-building logic, exporting utility functions, and extending test coverage beyond just fixing lint errors. Consider a more accurate title like 'refactor(backend): extract manifest builder and export utilities in GuildAutomationExecutionService' to better reflect the primary structural changes alongside lint fixes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/lint-guild-automation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Added explicit type assertions for Promise.all destructuring (101 errors → 1)
- Extracted manifest building logic to separate method to reduce complexity
- Wrapped builder parameters in object to meet max-params rule
- All 0 remaining eslint errors fixed
- All GuildAutomationExecutionService tests passing (28/28)
- Full repo lint passes with no errors
…ionService

- Cast unknown values to proper types (GuildAutomationRole, GuildAutomationChannel, GuildAutomationParity)
- Fix emoji/style type from unknown to string in reaction role mappings
- Add proper literal types for module/mode enums in command access grants
- Extract typedItem variable to avoid accessing unknown type properties directly
- Import missing types from guildAutomation/types module

All type checks now pass with no new errors.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/backend/tests/unit/services/GuildAutomationExecutionService.test.ts (1)

1344-1366: ⚠️ Potential issue | 🟡 Minor

Update commandaccess grants test to use valid mode values ('view' or 'manage') instead of 'allow'.

The test uses mode: 'allow' as any, which masks a type mismatch. The authoritative type GuildAutomationManifestDocument.commandaccess.grants[*].mode is narrowed to 'view' | 'manage' in packages/shared/src/services/guildAutomation/types.ts, and the production code at GuildAutomationExecutionService.ts line 941 casts grant data to that exact union. The invalid 'allow' mode should be replaced with a valid literal ('view' or 'manage'), and the as any cast should be removed. There are also similar instances at lines 804, 837, and 1455 in the same test file that use invalid mode values and should be updated.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/backend/tests/unit/services/GuildAutomationExecutionService.test.ts`
around lines 1344 - 1366, The test uses an invalid grant mode string ('allow')
with an as any cast which masks a type error; update the tests that build
manifests (e.g., calls to createMinimalManifest used in the commandaccess grants
tests) to use a valid mode literal ('view' or 'manage') instead of 'allow' and
remove the "as any" cast so the test matches the authoritative type
GuildAutomationManifestDocument.commandaccess.grants[*].mode; make the same
replacement for the other similar grant fixtures in the test file that currently
use 'allow' with an any-cast so the mocked calls and expectations remain correct
when GuildAutomationExecutionService casts grant data.
🧹 Nitpick comments (4)
packages/backend/tests/unit/services/GuildAutomationExecutionService.test.ts (1)

1517-1814: Nice added coverage — consider hoisting the repeated mock setup.

The four new captureGuildAutomationState tests (reaction roles, missing optional mapping fields, command access grants, automessage null normalization) meaningfully exercise the new buildGuildAutomationManifest path and its fallback branches. Good addition.

One optional cleanup: the block mocking getManifest/getSettings/getModerationSettings/getWelcomeMessage/getLeaveMessage/listReactionRoleMessages/listExclusiveRoles/listRoleGrants to null/[] is copy‑pasted in every test (including the pre‑existing ones). Extracting a setDefaultCaptureMocks({ overrides }) helper in beforeEach (or as a test util) would make each test body focus on just what it's verifying. Not a blocker.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/backend/tests/unit/services/GuildAutomationExecutionService.test.ts`
around lines 1517 - 1814, Extract the repeated mock setup into a shared helper
(e.g., setDefaultCaptureMocks) and call it from a beforeEach so each test only
overrides what it needs; specifically centralize the mocks for
guildAutomationService.getManifest, autoModService.getSettings,
getModerationSettings, autoMessageService.getWelcomeMessage,
autoMessageService.getLeaveMessage,
reactionRolesService.listReactionRoleMessages,
roleManagementService.listExclusiveRoles, and
guildRoleAccessService.listRoleGrants into that helper and allow an optional
overrides parameter for tests to replace specific return values.
packages/backend/src/services/GuildAutomationExecutionService.ts (3)

814-836: Drop the cast on the already-typed desired.reactionroles.exclusiveRoles loop.

Two observations:

  1. Line 828 iterates over desired.reactionroles?.exclusiveRoles, which GuildAutomationManifestDocument already types as Array<{ roleId: string; excludedRoleId: string }>. The typedItem cast on line 829 is pure noise and defeats the type safety the manifest already gives you.
  2. For the existing side (line 814), roleManagementService.listExclusiveRoles returns Prisma RoleExclusion[] with real roleId/excludedRoleId columns. Casting to unknown[] and then back is a round trip that loses safety rather than gaining anything. Prefer narrowing against the service's actual return type.

Also note unknown & { … } reduces to just { … } — the unknown & prefix adds no typing constraint.

♻️ Suggested diff
-        const existing = (await roleManagementService.listExclusiveRoles(guildId)) as unknown[]
-
-        for (const item of existing as unknown[]) {
-            const typedItem = item as unknown & { roleId: string; excludedRoleId: string }
-            const key = `${typedItem.roleId}:${typedItem.excludedRoleId}`
+        const existing = await roleManagementService.listExclusiveRoles(guildId)
+
+        for (const item of existing) {
+            const key = `${item.roleId}:${item.excludedRoleId}`
             if (!nextPairs.has(key)) {
                 await roleManagementService.removeExclusiveRole(
                     guildId,
-                    typedItem.roleId,
-                    typedItem.excludedRoleId,
+                    item.roleId,
+                    item.excludedRoleId,
                 )
             }
         }

         for (const item of desired.reactionroles?.exclusiveRoles ?? []) {
-            const typedItem = item as unknown & { roleId: string; excludedRoleId: string };
             await roleManagementService.setExclusiveRole(
                 guildId,
-                typedItem.roleId,
-                typedItem.excludedRoleId,
+                item.roleId,
+                item.excludedRoleId,
             )
         }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/backend/src/services/GuildAutomationExecutionService.ts` around
lines 814 - 836, Remove the unnecessary unknown casts and restore proper types:
stop casting desired.reactionroles?.exclusiveRoles items to unknown (remove the
typedItem = item as unknown & {...}) and iterate them with their declared type {
roleId: string; excludedRoleId: string } so setExclusiveRole(guildId, roleId,
excludedRoleId) gets strongly typed inputs; likewise change the existing
variable to the real return type of roleManagementService.listExclusiveRoles
(e.g., RoleExclusion[]) instead of unknown[] and remove the typedItem cast in
the loop that calls removeExclusiveRole so you preserve compile-time type safety
around roleId/excludedRoleId while still using nextPairs for membership checks.

561-586: Unnecessary unknown casting discards real type information.

autoMessageService.getWelcomeMessage/getLeaveMessage return a typed Prisma AutoMessage | null record that already exposes id. Casting first to unknown and then to unknown & { id: string } throws that away — and note unknown & T is semantically just T, so the intersection adds nothing. If the lint error was an unsafe-access complaint, narrowing against the real return type (or exporting a type from autoMessageService) is cleaner than opting out via unknown.

♻️ Suggested simplification
-        const existing = (
+        const existing =
             type === 'welcome'
                 ? await autoMessageService.getWelcomeMessage(guildId)
                 : await autoMessageService.getLeaveMessage(guildId)
-        ) as unknown

         if (!existing) {
             ...
         }

-        await autoMessageService.updateMessage((existing as unknown & { id: string }).id, {
+        await autoMessageService.updateMessage(existing.id, {
             message: payload.message,
             channelId: payload.channelId,
             enabled: payload.enabled,
         })

If the lint rule still complains, prefer adding an explicit return-type annotation on the service methods over casting.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/backend/src/services/GuildAutomationExecutionService.ts` around
lines 561 - 586, The code casts the result of
autoMessageService.getWelcomeMessage/getLeaveMessage to unknown which discards
type info; remove the unnecessary "as unknown" casts and let existing be the
real typed return (e.g., AutoMessage | null) so you can safely narrow with if
(!existing) and then call (existing.id) when updating; if the linter still
complains, add an explicit return type on those service methods (export the
AutoMessage type or annotate getWelcomeMessage/getLeaveMessage) rather than
using unknown casts.

1032-1053: Duplicate nested-manifest cast; consider a tiny accessor.

Lines 881 and 1032 both cast manifest to essentially the same inline shape ({ manifest?: { version?; parity? } }) to reach into nested fields. That's fine functionally, but it duplicates the assumed shape in two places and makes any future change to getManifest's return fragile. A single narrow helper (or — better — typing guildAutomationService.getManifest properly) would DRY this up.

function getStoredManifest(raw: unknown): { version?: number; parity?: unknown } | undefined {
    const outer = asObject(raw)
    const inner = outer ? asObject(outer.manifest) : null
    return (inner as { version?: number; parity?: unknown } | null) ?? undefined
}

Minor — not a blocker.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/backend/src/services/GuildAutomationExecutionService.ts` around
lines 1032 - 1053, The code duplicates an inline cast of manifest to access
nested fields (version/parity) in multiple places; create a single narrow helper
(e.g., getStoredManifest(raw: unknown): { version?: number; parity?: unknown } |
undefined) or tighten guildAutomationService.getManifest's return type, then
replace both ad-hoc casts with calls to that helper when you extract parity
(used when calling buildGuildAutomationManifest) and version (used earlier
around the other access), so both sites reuse the same typed accessor and remove
the duplicated inline cast logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@packages/backend/tests/unit/services/GuildAutomationExecutionService.test.ts`:
- Around line 1344-1366: The test uses an invalid grant mode string ('allow')
with an as any cast which masks a type error; update the tests that build
manifests (e.g., calls to createMinimalManifest used in the commandaccess grants
tests) to use a valid mode literal ('view' or 'manage') instead of 'allow' and
remove the "as any" cast so the test matches the authoritative type
GuildAutomationManifestDocument.commandaccess.grants[*].mode; make the same
replacement for the other similar grant fixtures in the test file that currently
use 'allow' with an any-cast so the mocked calls and expectations remain correct
when GuildAutomationExecutionService casts grant data.

---

Nitpick comments:
In `@packages/backend/src/services/GuildAutomationExecutionService.ts`:
- Around line 814-836: Remove the unnecessary unknown casts and restore proper
types: stop casting desired.reactionroles?.exclusiveRoles items to unknown
(remove the typedItem = item as unknown & {...}) and iterate them with their
declared type { roleId: string; excludedRoleId: string } so
setExclusiveRole(guildId, roleId, excludedRoleId) gets strongly typed inputs;
likewise change the existing variable to the real return type of
roleManagementService.listExclusiveRoles (e.g., RoleExclusion[]) instead of
unknown[] and remove the typedItem cast in the loop that calls
removeExclusiveRole so you preserve compile-time type safety around
roleId/excludedRoleId while still using nextPairs for membership checks.
- Around line 561-586: The code casts the result of
autoMessageService.getWelcomeMessage/getLeaveMessage to unknown which discards
type info; remove the unnecessary "as unknown" casts and let existing be the
real typed return (e.g., AutoMessage | null) so you can safely narrow with if
(!existing) and then call (existing.id) when updating; if the linter still
complains, add an explicit return type on those service methods (export the
AutoMessage type or annotate getWelcomeMessage/getLeaveMessage) rather than
using unknown casts.
- Around line 1032-1053: The code duplicates an inline cast of manifest to
access nested fields (version/parity) in multiple places; create a single narrow
helper (e.g., getStoredManifest(raw: unknown): { version?: number; parity?:
unknown } | undefined) or tighten guildAutomationService.getManifest's return
type, then replace both ad-hoc casts with calls to that helper when you extract
parity (used when calling buildGuildAutomationManifest) and version (used
earlier around the other access), so both sites reuse the same typed accessor
and remove the duplicated inline cast logic.

In
`@packages/backend/tests/unit/services/GuildAutomationExecutionService.test.ts`:
- Around line 1517-1814: Extract the repeated mock setup into a shared helper
(e.g., setDefaultCaptureMocks) and call it from a beforeEach so each test only
overrides what it needs; specifically centralize the mocks for
guildAutomationService.getManifest, autoModService.getSettings,
getModerationSettings, autoMessageService.getWelcomeMessage,
autoMessageService.getLeaveMessage,
reactionRolesService.listReactionRoleMessages,
roleManagementService.listExclusiveRoles, and
guildRoleAccessService.listRoleGrants into that helper and allow an optional
overrides parameter for tests to replace specific return values.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cb241853-781a-43c0-ad09-7190f2c9e5f0

📥 Commits

Reviewing files that changed from the base of the PR and between bcb13b0 and f88dce9.

📒 Files selected for processing (3)
  • package.json
  • packages/backend/src/services/GuildAutomationExecutionService.ts
  • packages/backend/tests/unit/services/GuildAutomationExecutionService.test.ts
📜 Review details
🔇 Additional comments (2)
package.json (2)

4-4: LGTM: Improved readability.

Replacing the escaped Unicode sequence with a literal em-dash improves readability while maintaining the same output.


86-86: This is a valid monorepo dependency pattern.

Adding eslint to root devDependencies is necessary for the root lint scripts (lines 20-21) to function. The frontend workspace also declares the same version (^10.2.0), which is a standard npm workspaces pattern where:

  • Root provides eslint for project-wide linting
  • Frontend declares it explicitly for its own environment
  • Other workspaces (backend, bot, shared) don't declare it and inherit via hoisting

No redundancy or dependency resolution issues exist here.

Comment thread packages/backend/src/services/GuildAutomationExecutionService.ts
- Export utility functions (normalizeName, asObject, toAutoModPayload, toModerationPayload, isExpectedDeleteError, isOnboardingUnavailable, mapChannelType, toDiscordChannelType)
- Add comprehensive unit tests for GuildAutomationExecutionError and utility functions
- Improve coverage from 86.68% to 90.82%
Resolved package.json conflict by taking main's v2.6.134.
@github-actions github-actions Bot removed the dependencies Pull requests that update a dependency file label Apr 17, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/backend/src/services/GuildAutomationExecutionService.ts (1)

152-183: ⚠️ Potential issue | 🟠 Major

Reject unsupported channel types instead of silently converting them to text.

toDiscordChannelType() falls back to 0 and mapChannelType() falls back to 'GuildText', allowing typos or unsupported manifest channel types to silently create text channels instead of failing. Make text an explicit case and throw on unknown values. Tests at lines 1849 and 1859 currently expect this fallback behavior and will need updating.

🐛 Proposed fix
 export function mapChannelType(type: number): string {
     switch (type) {
+        case 0:
+            return 'GuildText'
         case 4:
             return 'GuildCategory'
         case 2:
             return 'GuildVoice'
         case 5:
@@
         case 13:
             return 'GuildStageVoice'
         default:
-            return 'GuildText'
+            throw new GuildAutomationExecutionError(
+                `Unsupported Discord channel type: ${type}`,
+                400,
+            )
     }
 }
 
 export function toDiscordChannelType(type: string): number {
     switch (type) {
+        case 'GuildText':
+            return 0
         case 'GuildCategory':
             return 4
         case 'GuildVoice':
             return 2
         case 'GuildAnnouncement':
@@
         case 'GuildStageVoice':
             return 13
         default:
-            return 0
+            throw new GuildAutomationExecutionError(
+                `Unsupported manifest channel type: ${type}`,
+                400,
+            )
     }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/backend/src/services/GuildAutomationExecutionService.ts` around
lines 152 - 183, mapChannelType and toDiscordChannelType currently silently
default unknown inputs to 'GuildText' or 0; change them to handle 'GuildText'
explicitly and throw on unsupported values instead. In mapChannelType(type:
number) add an explicit case for the numeric code that corresponds to
'GuildText' and replace the default branch with a throw(new Error(...)) that
includes the provided numeric type; in toDiscordChannelType(type: string) add an
explicit case for 'GuildText' and replace the default branch with a throw(new
Error(...)) that includes the provided string; reference the functions
mapChannelType and toDiscordChannelType when making the changes so tests
expecting the old fallback can be updated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@packages/backend/src/services/GuildAutomationExecutionService.ts`:
- Around line 152-183: mapChannelType and toDiscordChannelType currently
silently default unknown inputs to 'GuildText' or 0; change them to handle
'GuildText' explicitly and throw on unsupported values instead. In
mapChannelType(type: number) add an explicit case for the numeric code that
corresponds to 'GuildText' and replace the default branch with a throw(new
Error(...)) that includes the provided numeric type; in
toDiscordChannelType(type: string) add an explicit case for 'GuildText' and
replace the default branch with a throw(new Error(...)) that includes the
provided string; reference the functions mapChannelType and toDiscordChannelType
when making the changes so tests expecting the old fallback can be updated.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ae2dd30c-bb02-4cbe-a508-15a9328bd8b8

📥 Commits

Reviewing files that changed from the base of the PR and between f88dce9 and bbc5dc2.

📒 Files selected for processing (2)
  • packages/backend/src/services/GuildAutomationExecutionService.ts
  • packages/backend/tests/unit/services/GuildAutomationExecutionService.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Quality Gates
  • GitHub Check: SonarCloud Scan
🔇 Additional comments (2)
packages/backend/src/services/GuildAutomationExecutionService.ts (1)

838-953: Replace no-op unknown & T assertions with typed inputs or validation.

The manifest builder still asserts loosely typed service results into final manifest fields, including command access module/mode, without runtime validation. Prefer concrete upstream return types or schema parsing before constructing the manifest.

#!/bin/bash
# Description: Locate remaining no-op unknown intersections and compare command access literals with the shared manifest type.
rg -nP --type=ts -C2 'unknown\s*&|as\s+unknown\s*&' packages/backend/src/services/GuildAutomationExecutionService.ts
rg -nP --type=ts -C5 'commandaccess|mode:\s*'\''view'\''|mode:\s*'\''manage'\''' packages/shared/src/services/guildAutomation/types.ts
packages/backend/tests/unit/services/GuildAutomationExecutionService.test.ts (1)

1528-1825: Good coverage for capture-state edge cases.

The added tests cover reaction-role mappings, exclusive-role capture, command access grants, and null→undefined automessage normalization.

@sonarqubecloud

Copy link
Copy Markdown

@LucasSantana-Dev
LucasSantana-Dev merged commit 73f77a6 into main Apr 17, 2026
12 checks passed
LucasSantana-Dev added a commit that referenced this pull request May 13, 2026
* chore(backend): eliminate lint errors in GuildAutomationExecutionService

- Added explicit type assertions for Promise.all destructuring (101 errors → 1)
- Extracted manifest building logic to separate method to reduce complexity
- Wrapped builder parameters in object to meet max-params rule
- All 0 remaining eslint errors fixed
- All GuildAutomationExecutionService tests passing (28/28)
- Full repo lint passes with no errors

* fix(backend): resolve TypeScript type errors in GuildAutomationExecutionService

- Cast unknown values to proper types (GuildAutomationRole, GuildAutomationChannel, GuildAutomationParity)
- Fix emoji/style type from unknown to string in reaction role mappings
- Add proper literal types for module/mode enums in command access grants
- Extract typedItem variable to avoid accessing unknown type properties directly
- Import missing types from guildAutomation/types module

All type checks now pass with no new errors.

* chore: sync package-lock.json after eslint version bump

* Revert "chore: sync package-lock.json after eslint version bump"

This reverts commit cbcc602afee8dfbbc54686e87d921a8923065716.

* test: add reaction roles and command access coverage to GuildAutomationExecutionService tests

* test: add utility function tests for GuildAutomationExecutionService

- Export utility functions (normalizeName, asObject, toAutoModPayload, toModerationPayload, isExpectedDeleteError, isOnboardingUnavailable, mapChannelType, toDiscordChannelType)
- Add comprehensive unit tests for GuildAutomationExecutionError and utility functions
- Improve coverage from 86.68% to 90.82%
@LucasSantana-Dev
LucasSantana-Dev deleted the chore/lint-guild-automation branch May 23, 2026 02:21

This branch was successfully deployed

1 active deployment
Preview — bbc5dc2c Deployed Apr 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant