1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "workflows": [
10 {
11 "owner_repo": "python/cpython",
12 "workflow_file": "stale.yml",
13 "expected_max_interval_minutes": 1440,
14 },
15 {
16 "owner_repo": "home-assistant/core",
17 "workflow_file": "stale.yml",
18 "expected_max_interval_minutes": 1440,
19 },
20 {
21 "owner_repo": "rust-lang/rust",
22 "workflow_file": "ghcr.yml",
23 "expected_max_interval_minutes": 2880,
24 },
25 ],
26 "failureStreakThreshold": 2,
27 "alertWebhookUrl": "",
28 "runEventFilter": "schedule",
29 "runsPerWorkflow": 10,
30 "suppressRepeatAlerts": True,
31 "stateStoreName": "gha-schedule-monitor-state",
32 "confirmSilence": True,
33 "silenceConfirmDelaySeconds": 3,
34 "timeoutSeconds": 15,
35 "requestsPerSecond": 5,
36 "maxResponseBytes": 2000000,
37}
38
39
40run = client.actor("kingii98/scheduled-github-actions-workflow-silence-and-failure-report").call(run_input=run_input)
41
42
43print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
44for item in client.dataset(run.default_dataset_id).iterate_items():
45 print(item)
46
47