Skip to content

Commit 85201a0

Browse files
committed
Refactor to use recurrence_end_date_time variable for consistency
Extract the recurrence end date calculation into a Jinja2 variable to avoid duplicating the logic. Both recurrence.end_date_time and series_end_date now reference this shared variable, ensuring consistency and making the code more maintainable. Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Andres Tobon <[email protected]>
1 parent 1c35061 commit 85201a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

playbooks/v1_meetings/umbrella_board_meeting/board_meeting.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ buf_board_meeting_create:
6161
{# Map Python weekday (0 = Monday, 6 = Sunday) to Zoom (1 = Sunday, 7 = Saturday). #}
6262
{% set zoom_week_day = (meeting_start_time.weekday() + 1) % 7 + 1 %}
6363
{% set week_of_month = (meeting_start_time.day / 7) | round(0, 'ceil') | int %}
64+
{% set recurrence_end_date_time = meeting_start_time + timedelta(days=365*100) %}
6465
# Renamed from `meeting_id` in v1.
6566
id: "{{ meeting_id }}"
6667
topic: Monthly Board Meeting
@@ -74,12 +75,12 @@ buf_board_meeting_create:
7475
password: {{ fake.uuid4() }}
7576
recurrence:
7677
# 100 years from initial meeting.
77-
end_date_time: "{{ (meeting_start_time + timedelta(days=365*100)).isoformat() }}Z"
78+
end_date_time: "{{ recurrence_end_date_time.isoformat() }}Z"
7879
repeat_interval: "1"
7980
type: "3"
8081
monthly_week: "{{ week_of_month }}"
8182
monthly_week_day: "{{ zoom_week_day }}"
82-
series_end_date: "{{ (meeting_start_time + timedelta(days=365*100, minutes=meeting_duration)).isoformat() }}Z"
83+
series_end_date: "{{ (recurrence_end_date_time + timedelta(minutes=meeting_duration)).isoformat() }}Z"
8384
zoom_ai_enabled: true
8485
# 6-digit numeric passcode.
8586
host_key: "{{ fake.pyint(min_value=100000, max_value=999999) }}"

0 commit comments

Comments
 (0)