@@ -759,7 +759,7 @@ def _setup_auto_add_committee_to_threads(cls) -> None:
759759 def _setup_committee_actions_reminders (cls ) -> None :
760760 raw_committee_actions_reminders : str = str (
761761 os .getenv ("COMMITTEE_ACTIONS_REMINDERS" , "True" ),
762- ).lower ()
762+ ).strip (). lower ()
763763
764764 if raw_committee_actions_reminders not in TRUE_VALUES | FALSE_VALUES :
765765 INVALID_COMMITTEE_ACTIONS_REMINDERS_MESSAGE : Final [str ] = (
@@ -771,6 +771,46 @@ def _setup_committee_actions_reminders(cls) -> None:
771771 raw_committee_actions_reminders in TRUE_VALUES
772772 )
773773
774+ @classmethod
775+ def _setup_committee_actions_board (cls ) -> None :
776+ raw_committee_actions_board : str = os .getenv ("COMMITTEE_ACTIONS_BOARD" , "True" ).strip ().lower ()
777+
778+ if raw_committee_actions_board not in TRUE_VALUES | FALSE_VALUES :
779+ INVALID_COMMITTEE_ACTIONS_BOARD_MESSAGE : Final [str ] = (
780+ "COMMITTEE_ACTIONS_BOARD must be a boolean value."
781+ )
782+ raise ImproperlyConfiguredError (INVALID_COMMITTEE_ACTIONS_BOARD_MESSAGE )
783+
784+ cls ._settings ["COMMITTEE_ACTIONS_BOARD" ] = (
785+ raw_committee_actions_board in TRUE_VALUES
786+ )
787+
788+ @classmethod
789+ def _setup_committee_actions_board_channel (cls ) -> None :
790+ if "COMMITTEE_ACTIONS_BOARD" not in cls ._settings :
791+ INVALID_SETUP_ORDER_MESSAGE : Final [str ] = (
792+ "Invalid setup order: COMMITTEE_ACTIONS_BOARD must be set up "
793+ "before COMMITTEE_ACTIONS_BOARD_CHANNEL can be set up."
794+ )
795+ raise RuntimeError (INVALID_SETUP_ORDER_MESSAGE )
796+
797+ INVALID_COMMITTEE_ACTIONS_BOARD_CHANNEL_MESSAGE : Final [str ] = (
798+ "COMMITTEE_ACTIONS_BOARD_CHANNEL must be a valid name"
799+ " of a channel in your group's Discord guild."
800+ )
801+
802+ raw_committee_actions_board_channel : str = os .getenv (
803+ "COMMITTEE_ACTIONS_BOARD_CHANNEL" ,
804+ "actions-board" ,
805+ ).strip ().lower ()
806+
807+ if not raw_committee_actions_board_channel :
808+ raise ImproperlyConfiguredError (INVALID_COMMITTEE_ACTIONS_BOARD_CHANNEL_MESSAGE )
809+
810+ cls ._settings ["COMMITTEE_ACTIONS_BOARD_CHANNEL" ] = (
811+ raw_committee_actions_board_channel
812+ )
813+
774814 @classmethod
775815 def _setup_committee_actions_reminders_interval (cls ) -> None :
776816 if "COMMITTEE_ACTIONS_REMINDERS" not in cls ._settings :
@@ -853,6 +893,8 @@ def _setup_env_variables(cls) -> None:
853893 cls ._setup_strike_performed_manually_warning_location ()
854894 cls ._setup_auto_add_committee_to_threads ()
855895 cls ._setup_committee_actions_reminders ()
896+ cls ._setup_committee_actions_board ()
897+ cls ._setup_committee_actions_board_channel ()
856898 cls ._setup_committee_actions_reminders_interval ()
857899 except ImproperlyConfiguredError as improper_config_error :
858900 webhook_config_logger .error (improper_config_error .message ) # noqa: TRY400
0 commit comments