Skip to content

chore: remove unused BUG_REPORT_CHANNEL_ID and TICKET_CHANNEL_ID env vars - #29

Merged
DysektAI merged 2 commits into
mainfrom
chore/remove-dead-env-vars
Jul 8, 2026
Merged

chore: remove unused BUG_REPORT_CHANNEL_ID and TICKET_CHANNEL_ID env vars#29
DysektAI merged 2 commits into
mainfrom
chore/remove-dead-env-vars

Conversation

@DysektAI

@DysektAI DysektAI commented Jul 8, 2026

Copy link
Copy Markdown
Member

User description

Summary

Maintainability sweep finding: BUG_REPORT_CHANNEL_ID and TICKET_CHANNEL_ID were listed as required environment variables but were never read anywhere in the codebase. Operators were forced to configure values that did nothing, and startup would fail without them.

Changes

  • src/config/env.js — removed both vars from requiredEnvVars
  • test/env.test.js — removed both from the ensureEnvVars happy-path test
  • .env.example — removed both example entries
  • README.md — removed both from the env config docs

Verification

  • npm test → 4/4 pass
  • rg confirms zero remaining references to either variable (excluding node_modules)
  • depcheck confirms no unused dependencies introduced

Risk

Low — behavior-preserving deletion of dead configuration only. No runtime code path referenced these variables. Existing deployments with the vars set are unaffected (extra env vars are simply ignored).


CodeAnt-AI Description

Stop requiring unused Discord channel settings

What Changed

  • Removed BUG_REPORT_CHANNEL_ID and TICKET_CHANNEL_ID from the required startup settings, so the app no longer fails if they are missing
  • Updated the setup docs and example environment file to show only the channel setting that is still used
  • Removed the two unused values from the startup test

Impact

✅ Fewer startup failures
✅ Shorter setup for new installs
✅ Clearer environment configuration

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

…vars

Neither variable was read anywhere in the codebase — they only existed in
the required-env list, forcing operators to configure values that were
never used. Drops them from env validation, tests, .env.example, and README.
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: fe97b476-2aff-48f7-b759-375d2ff2b1ba

📥 Commits

Reviewing files that changed from the base of the PR and between 2b6d8ef and 052ad9f.

📒 Files selected for processing (4)
  • .env.example
  • README.md
  • src/config/env.js
  • test/env.test.js
💤 Files with no reviewable changes (3)
  • .env.example
  • src/config/env.js
  • test/env.test.js

📝 Walkthrough

Summary by CodeRabbit

  • Documentation

    • Updated setup instructions for environment variables, including revised Discord channel and role configuration details.
  • Chores

    • Simplified the example environment file by removing outdated channel placeholders and adding the current welcome channel setting.
    • Adjusted environment validation to match the latest required variables.
    • Updated automated checks to reflect the new configuration requirements.

Walkthrough

The PR removes BUG_REPORT_CHANNEL_ID and TICKET_CHANNEL_ID from required environment variables, replacing them with WELCOME_CHANNEL_ID in the config module, .env.example, README, and test setup. README also documents additional role-related variables.

Changes

Environment variable update

Layer / File(s) Summary
Update required env vars and example config
src/config/env.js, .env.example
requiredEnvVars and the example env file drop BUG_REPORT_CHANNEL_ID/TICKET_CHANNEL_ID and add WELCOME_CHANNEL_ID.
Update docs and tests for new env vars
README.md, test/env.test.js
README documents WELCOME_CHANNEL_ID plus new role variables (PANEL_ADMIN_ROLE_ID, AUTO_ROLE_ID_14, ALLOWED_COMMAND_ROLE_IDS) and removes old channel entries; test setup no longer sets the removed variables.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: Nivmizz7

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing two unused environment variables.
Description check ✅ Passed The description is directly related to the PR and correctly explains the removed env vars and documentation updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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/remove-dead-env-vars

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

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Jul 8, 2026
@kilo-code-bot

This comment was marked as resolved.

@DysektAI
DysektAI requested a review from Nivmizz7 July 8, 2026 11:49
@DysektAI DysektAI self-assigned this Jul 8, 2026
Add a Role IDs bullet covering PANEL_ADMIN_ROLE_ID and
AUTO_ROLE_ID_1-4 (required at boot by src/config/env.js) plus
optional ALLOWED_COMMAND_ROLE_IDS. Closes a docs gap surfaced
during the PR #29 production-readiness review.
@DysektAI
DysektAI merged commit 433ba5d into main Jul 8, 2026
10 of 11 checks passed
@DysektAI
DysektAI deleted the chore/remove-dead-env-vars branch July 8, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant