Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dependencies = [
"httpx==0.28.1",
"icalendar==7.0.3",
"jinja2==3.1.6",
"logging==0.4.9.6",
"python-multipart==0.0.22",
"pyyaml==6.0.3",
"recurring-ical-events==3.8.1",
Expand Down
3 changes: 3 additions & 0 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def _get_env_variable(name: str, default: str | None = None) -> str | None:
SLACK_TECHNICAL_SEMINAR_KEYWORD: str = _get_env_variable(
"SLACK_TECHNICAL_SEMINAR_KEYWORD", "technical"
)
SLACK_ADHOC_KEYWORD: str = _get_env_variable(
"SLACK_ADHOC_KEYWORD", "adhoc"
)

SLACK_ALLOW_ANNOUNCEMENTS: bool = (
_get_env_variable("SLACK_ALLOW_ANNOUNCEMENTS", "false") == "true"
Expand Down
5 changes: 4 additions & 1 deletion src/core/announcement_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
SLACK_TECHNICAL_SEMINAR_KEYWORD,
SLACK_NONTECHNICAL_SEMINAR_KEYWORD,
SLACK_MEETINGS_KEYWORD,
SLACK_ADHOC_KEYWORD,
LOGGING_LEVEL,
)

Expand Down Expand Up @@ -53,7 +54,6 @@ async def create_announcement_worker(

key: str = f"{event_uid}:{event_recurrence_id}" # we should use redis instead

logger.info(key)
current_time: datetime = datetime.now(ZoneInfo(CALENDAR_TIMEZONE))
if current_time < (event_time - timedelta(minutes=MINUTES_BEFORE_EVENT_PING)):
wait_time = (
Expand Down Expand Up @@ -160,6 +160,9 @@ def check_for_announcement(event: dict[str, Any], time: datetime) -> str | None:
case x if SLACK_MEETINGS_KEYWORD.lower() in x:
message = f"<!subteam^{SLACK_MEETINGS_GROUP_ID}> The {title} directorship will be happening {f'in the {loc} ' if loc else ''}in {MINUTES_BEFORE_EVENT_PING} minutes!"

case x if SLACK_ADHOC_KEYWORD.lower() in x:
message = f"<!subteam^{SLACK_MEETINGS_GROUP_ID}> The {title} adhoc will be happening {f'in the {loc} ' if loc else ''}in {MINUTES_BEFORE_EVENT_PING} minutes!"

case x if "gick" in x:
message = f"<!subteam^{SLACK_TEST_GROUP_ID}> {f'gick go to the {loc}' if loc else 'hi gick'}!"

Expand Down
8 changes: 0 additions & 8 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading