Skip to content

Conversation

@MattyTheHacker
Copy link
Member

#516 is suspended pending these changes, just to reduce the CHONK in that pr

@MattyTheHacker MattyTheHacker self-assigned this May 31, 2025
@MattyTheHacker MattyTheHacker added the enhancement New feature or request label May 31, 2025
@MattyTheHacker MattyTheHacker requested a review from Copilot May 31, 2025 21:52
Copy link
Contributor

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

Implements minor config fixes to standardize environment variable handling and add stricter validation on durations and URLs.

  • Unified os.getenv calls with explicit defaults and .strip() for consistent input parsing
  • Added minimum thresholds for reminder intervals and statistics durations
  • Extended VALID_SEND_INTRODUCTION_REMINDERS_VALUES to include "interval"
Comments suppressed due to low confidence (1)

config.py:187

  • Validation for DISCORD_LOG_CHANNEL_WEBHOOK_URL now applies unconditionally, causing an error when the environment variable is unset. Consider restoring a guard (e.g. if raw_discord_log_channel_webhook_url and (...)) so empty values skip validation.
if not validators.url(

config.py Outdated
cls._settings["PURCHASE_MEMBERSHIP_URL"] = None
return

if "://" not in raw_purchase_membership_url:
Copy link

Copilot AI May 31, 2025

Choose a reason for hiding this comment

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

[nitpick] The URL prefix-and-validate pattern is duplicated across several _setup_*_url methods. Consider extracting a helper function to DRY this logic and ensure consistency.

Copilot uses AI. Check for mistakes.
@MattyTheHacker MattyTheHacker added the sync Request bots to automatically keep this PR up to date with it's base branch label Jun 4, 2025
@CarrotManMatt CarrotManMatt added refactor Improvements to the codebase that do not directly affect users and removed enhancement New feature or request labels Jun 13, 2025
Thatsmusic99 and others added 2 commits June 15, 2025 13:49
…#508)

Signed-off-by: Holly <[email protected]>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Matty Widdop <[email protected]>
@MattyTheHacker
Copy link
Member Author

@CarrotManMatt I think the variables are better having defaults of empty strings, just cleaner that way since we treat no value the same as an empty value.

With the casting I've also added casts to all variables whereas we didn't have that before. Is there a difference between using cast or just str?

@codecov
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

Attention: Patch coverage is 2.43902% with 40 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
config.py 2.43% 40 Missing ⚠️

📢 Thoughts on this report? Let us know!

auto-merge was automatically disabled June 16, 2025 10:13

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Improvements to the codebase that do not directly affect users sync Request bots to automatically keep this PR up to date with it's base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants