Skip to content

refactor: move src/lib types to src/bot/api/types, add missing tests#33

Merged
BigMichi1 merged 2 commits into
mainfrom
refactor/move-lib-types-add-tests
May 17, 2026
Merged

refactor: move src/lib types to src/bot/api/types, add missing tests#33
BigMichi1 merged 2 commits into
mainfrom
refactor/move-lib-types-add-tests

Conversation

@BigMichi1
Copy link
Copy Markdown
Owner

No description provided.

Signed-off-by: Michael Cramer <michael@bigmichi1.de>
Copilot AI review requested due to automatic review settings May 17, 2026 09:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR moves Idle Champions API declaration types from src/lib into src/bot/api/types and expands test coverage for database, scanner, and API request logging utilities.

Changes:

  • Updated API type reference paths and Docker/ESLint configuration for the new type location.
  • Added declaration files under src/bot/api/types.
  • Added tests for backfill management, code scanning, code manager helpers, and API request logging.

Reviewed changes

Copilot reviewed 7 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Dockerfile Stops copying removed src/lib into the build context.
eslint.config.mjs Ignores the relocated generated API type declarations.
src/bot/api/idleChampionsApi.ts Points triple-slash references to src/bot/api/types.
src/bot/api/types/blacksmith_response.d.ts Adds relocated blacksmith API response types.
src/bot/api/types/player_data.d.ts Adds relocated player data API response types.
src/bot/api/types/redeem_code_response.d.ts Adds relocated redemption/chest API response types.
src/bot/api/types/server_definitions.d.ts Adds relocated server definition response types.
src/bot/database/backfillManager.test.ts Adds tests for backfill lifecycle and query helpers.
src/bot/database/codeManager.test.ts Adds tests for redeemed/public code helper methods.
src/bot/handlers/codeScanner.test.ts Adds DB-backed tests for scanning messages for new codes.
src/bot/utils/apiRequestLogger.test.ts Adds tests for request log writing and reading behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/bot/utils/apiRequestLogger.test.ts
Signed-off-by: Michael Cramer <michael@bigmichi1.de>
@github-actions
Copy link
Copy Markdown

✅ Coverage Report

Metric Value
Current coverage 65.89% (1192/1809)
Baseline coverage 54.44% (938/1723)
Result PASS

New Files

File Coverage Lines Status
src/bot/database/backfillManager.test.ts SKIP (ignored)
src/bot/utils/apiRequestLogger.test.ts SKIP (ignored)

Changed Files

File Baseline Current Status
src/bot/api/idleChampionsApi.ts 9.03% 9.03% PASS
src/bot/database/codeManager.test.ts SKIP (ignored)
src/bot/handlers/codeScanner.test.ts SKIP (ignored)
src/bot/utils/apiRequestLogger.ts 10.90% 69.80% PASS

@BigMichi1 BigMichi1 merged commit fbdc753 into main May 17, 2026
12 checks passed
@BigMichi1 BigMichi1 deleted the refactor/move-lib-types-add-tests branch May 17, 2026 10:00
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