Skip to content

refactor: reorganize files#43

Merged
calebephrem merged 1 commit into
open-devhub:mainfrom
calebephrem:main
Jul 20, 2026
Merged

refactor: reorganize files#43
calebephrem merged 1 commit into
open-devhub:mainfrom
calebephrem:main

Conversation

@calebephrem

Copy link
Copy Markdown
Member

What does this PR do?

File organizing (especially /src/utils)

Closes

  • Closes [none]

Type of change(s)

  • Bug fix
  • New feature
  • Documentation update
  • Style / UX change
  • Refactor (no functional change)
  • Performance improvement
  • Other

Checklist

  • I've tested this change locally and it works as expected
  • bun run typecheck or npm run typecheck completes without errors
  • My commit messages follow Conventional Commits (e.g. fix: ..., feat: ..., chore: ...)
  • I've updated relevant docs (README, comments, etc.) if this change needs it
  • No leftover console.log or debug code

@devhub-bot devhub-bot Bot added the refactor code restructure label Jul 20, 2026
@beetle-ai

beetle-ai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary by Beetle

This PR implements a comprehensive file reorganization and refactoring of the utility modules in the QuillBot Discord bot. The changes reorganize scattered utility files into a logical, categorized folder structure (code/, discord/, fs/, misc/, parse/) to improve code organization, maintainability, and discoverability. All 20 files affected are import path updates reflecting the new utility module hierarchy, with no functional changes to the actual code logic.

📁 File Changes Summary (Consolidated across all commits):

File Status Changes Description
src/commands/!misc/resolve.ts
src/commands/!misc/stats.ts
src/commands/code/complexity.ts
src/commands/code/format.ts
src/commands/code/run.ts
src/commands/code/suggest.ts
src/commands/code/whatlang.ts
src/commands/docs/man.ts
src/commands/github/profile.ts
src/commands/meta/changelog.ts
src/commands/misc/help.ts
src/commands/support/feature.ts
src/commands/support/report.ts
src/events/interactionCreate/handleInteractions.ts
src/events/messageCreate/handleCommands.ts
src/firestore/cacheDB.ts
src/handlers/eventHandler.ts
src/interactions/changelog.ts
Modified +20/-20 Updated import paths to reflect new utility module organization. All imports now point to categorized utility folders: utils/code/, utils/discord/, utils/fs/, utils/misc/, utils/parse/ instead of flat utils/ directory.
src/utils/discord/log.ts
src/utils/misc/stats.ts
Renamed +4/-4 Moved from root utils/ to categorized subdirectories with updated relative import paths. log.ts moved to discord/ (Discord-specific utilities), stats.ts moved to misc/ (miscellaneous utilities).

Total Changes: 20 files changed, +24 additions, -24 deletions

🎯 Key Changes:

  • Utility Module Reorganization: Utilities are now organized into semantic categories:
  • utils/code/ - Code analysis and parsing utilities (analyzeComplexity.ts, codeInput.ts)
  • utils/discord/ - Discord.js-specific utilities (log.ts)
  • utils/fs/ - File system operations (fileOps.ts, getAllFiles.ts)
  • utils/misc/ - Miscellaneous utilities (stats.ts, man.ts, githubActivityGraph.ts)
  • utils/parse/ - Parsing utilities (parseChangelog.ts)
  • Import Path Updates: All 18 command files, event handlers, and core modules updated to reference utilities from their new categorized locations
  • Relative Path Adjustments: Files moved to subdirectories had their relative import paths adjusted (e.g., ../../config.json../../../config.json)
  • Zero Functional Changes: This is a pure refactoring—no logic modifications, only structural reorganization

📊 Impact Assessment:

  • Security: ✅ No impact. Import path changes do not affect security posture. No authentication, validation, or permission logic modified.
  • Performance: ✅ No impact. Module organization is a compile-time concern. Runtime performance remains identical. No algorithmic changes or optimization work performed.
  • Maintainability: ✅ Significant improvement. Categorized utility structure makes it easier to:
  • Locate related utilities by purpose (code analysis, Discord operations, file I/O, etc.)
  • Understand module responsibilities at a glance
  • Scale utilities as the codebase grows
  • Onboard new developers with clearer module organization
  • Testing: ✅ No impact on test coverage. No functional changes means existing tests remain valid. Import paths in test files would need corresponding updates if tests exist, but no test files appear in this PR.
⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

Follow us: Beetle · X · LinkedIn

@devhub-bot

devhub-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Note

Linting checks passed successfully 🎉

All formatting and code quality checks are clean.

You're good to merge 🚀

@beetle-ai

beetle-ai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

✅ You're good to merge this PR! No issues found. Great job!

Settings
⚙️ Settings

Severity Threshold: Medium — Balanced feedback — medium and high severity issues only.Change in Settings
Custom Rules: Define your own review rules — Set Custom Rules
PR Summary: Configure PR summary — Change in Settings

📖 User Guide
  • Once repos are connected, PR analysis is automatically enabled. You can disable analysis for this repo from beetleai.dev/analysis
  • Comment @beetle on any PR to start analysis manually
  • Comment @beetle stop to stop any ongoing analysis

@calebephrem
calebephrem merged commit 2225714 into open-devhub:main Jul 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor code restructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant