Skip to content

Commit c565c14

Browse files
jeremymanningclaude
andcommitted
Mark office hours as Free and normalize name to lowercase
Office hours events are automatically set to transparency=transparent (Free) and the name is normalized to "Jeremy office hours" style (lowercase). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dbaf0f1 commit c565c14

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

cdl_bot/services/calendar_service.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ def create_recurring_event(
255255
location: str = PROJECT_LOCATION,
256256
is_biweekly: bool = False,
257257
week_offset: int = 0,
258+
free: bool = False,
258259
attendee_emails: Optional[list] = None,
259260
description: str = "",
260261
) -> tuple[bool, Optional[str], Optional[str]]:
@@ -313,6 +314,9 @@ def create_recurring_event(
313314
"recurrence": [rrule],
314315
}
315316

317+
if free:
318+
event_body["transparency"] = "transparent"
319+
316320
if description:
317321
event_body["description"] = description
318322

@@ -373,10 +377,18 @@ def create_schedule_events(
373377
end = row["End Time"][:5]
374378
is_biweekly = "Biweekly" in row["Frequency"]
375379

376-
# Determine location
380+
# Determine location and special flags
377381
is_individual = meeting_name.endswith(" one-on-one")
382+
is_office_hours = "office hours" in meeting_name.lower()
378383
location = INDIVIDUAL_LOCATION if is_individual else PROJECT_LOCATION
379384

385+
# Office hours: use lowercase name and mark as free
386+
summary = meeting_name
387+
if is_office_hours:
388+
# Normalize to "Jeremy office hours" style
389+
parts = meeting_name.split()
390+
summary = parts[0] + " office hours" if parts else meeting_name
391+
380392
# For biweekly meetings, check if another biweekly already occupies
381393
# this slot and offset by 1 week so they alternate
382394
week_offset = 0
@@ -388,7 +400,7 @@ def create_schedule_events(
388400

389401
success, error, event_id = self.create_recurring_event(
390402
calendar_id=calendar_id,
391-
summary=meeting_name,
403+
summary=summary,
392404
day=day,
393405
start_time=start,
394406
end_time=end,
@@ -397,6 +409,7 @@ def create_schedule_events(
397409
location=location,
398410
is_biweekly=is_biweekly,
399411
week_offset=week_offset,
412+
free=is_office_hours,
400413
)
401414

402415
results.append({

0 commit comments

Comments
 (0)