INNER CODE UNIT · Python
matches_dispatch
trinodb/trino · .github/bin/build-matrix-schedule-aware.py:270
def matches_dispatch(
github_context: dict[str, Any], schedule_filter: ScheduleFilter
) -> bool:
return schedule_filter.dispatches and github_context.get("event_name") in [
"workflow_dispatch",
"repository_dispatch",
]
_WEEKLY_CRON = re.compile(r"^\d+ \d+ \* \* [0-7]$")
def matches_scheduled(
github_context: dict[str, Any], schedule_filter: ScheduleFilter
) -> bool:
if (
github_context.get("event_name") != "schedule"
or schedule_filter.scheduled == Schedule.never