diff --git a/coverage_comment/activity.py b/coverage_comment/activity.py index a805955c..cfa575fb 100644 --- a/coverage_comment/activity.py +++ b/coverage_comment/activity.py @@ -20,7 +20,7 @@ def find_activity( if event_name == "workflow_run": return "post_comment" - if event_name == "push" and is_default_branch: + if (event_name == "push" and is_default_branch) or event_name == "schedule": return "save_coverage_data_files" if event_name not in {"pull_request", "push"}: diff --git a/coverage_comment/main.py b/coverage_comment/main.py index 701a1c14..6b08dae5 100644 --- a/coverage_comment/main.py +++ b/coverage_comment/main.py @@ -77,9 +77,9 @@ def action( ) except activity_module.ActivityNotFound: log.error( - 'This action has only been designed to work for "pull_request", "push" ' - f'or "workflow_run" actions, not "{event_name}". Because there are security ' - "implications. If you have a different usecase, please open an issue, " + 'This action has only been designed to work for "pull_request", "push", ' + f'"workflow_run" or "schedule" actions, not "{event_name}". Because there ' + "are security implications. If you have a different usecase, please open an issue, " "we'll be glad to add compatibility." ) return 1