chore: remove unused string-constant environment variables#227
Conversation
MESSAGE, BRANCH, AUTHOR_NAME, AUTHOR_EMAIL, DRY_RUN, JOB_SUMMARY, PR_COMMENTS, and PR_TITLE were defined via os.getenv() but never read anywhere in the codebase. The actual logic uses env_flag() which reads the environment variables again from scratch via string literals. These 8 lines were pure dead code.
|
Warning Review limit reached
Next review available in: 28 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Commit-Check ✔️ |
Summary
Removes 8 dead-code lines at the top of
main.pythat define string-constantenvironment variables (
MESSAGE,BRANCH,AUTHOR_NAME,AUTHOR_EMAIL,DRY_RUN,JOB_SUMMARY,PR_COMMENTS,PR_TITLE) — these wereassigned via
os.getenv()but never read anywhere in the codebase.Why safe
env_flag("MESSAGE")etc., which callsos.getenv()internally — the string constants were never referenced.log_env_vars()iterates over string literals, not these variables.Verification
Confirmed each appears only in its definition and nowhere else. No other files
in the repo reference them either.