Commit a4e3ff8
committed
Stop trusting GitHub's Action runs filtering by date
In 1ff8966 (Hot fix: accommodate for (silent?) change in GitHub API's
condition parsing, 2026-01-15), I tried to address a bug that led to
"timeouts" left and right, due to the `created=>${after}` filter not
working as it used to: The corresponding GitHub API call to list all
the recent workflow runs would always return 0 matches. To fix that, I
replaced the `=>` operator with the `>=` operator. With that operator,
the API calls finally returns a non-empty result.
What I failed to anticipate was that the result is completely wrong.
You are forgiven if you think, like I did, that the `created>=${after}`
filter would only return recent runs, as documented here:
https://docs.github.com/en/rest/actions/workflow-runs#list-workflow-runs-for-a-repository
However, this is absolutely, positively not the case. See here:
$ gh api \
repos/git-for-windows/git-for-windows-automation/actions/runs?actor='gitforwindowshelper[bot]&event=workflow_dispatch&created>=2026-01-15T12:00:00Z' |
jq |
grep created_at
"created_at": "2026-01-15T22:18:14Z",
"created_at": "2026-01-15T20:58:42Z",
"created_at": "2026-01-15T12:42:57Z",
"created_at": "2026-01-15T12:17:48Z",
"created_at": "2026-01-15T12:17:45Z",
"created_at": "2026-01-15T12:17:43Z",
"created_at": "2026-01-15T12:12:21Z",
"created_at": "2026-01-15T12:10:25Z",
"created_at": "2026-01-15T12:01:04Z",
"created_at": "2026-01-15T09:39:35Z",
"created_at": "2026-01-14T13:56:33Z",
"created_at": "2026-01-09T11:40:57Z",
"created_at": "2026-01-08T18:49:18Z",
"created_at": "2026-01-08T18:13:21Z",
"created_at": "2026-01-07T21:09:24Z",
"created_at": "2026-01-07T21:09:21Z",
"created_at": "2026-01-07T21:09:17Z",
"created_at": "2026-01-07T21:08:59Z",
"created_at": "2026-01-07T09:00:34Z",
"created_at": "2026-01-06T11:24:19Z",
"created_at": "2026-01-04T09:26:02Z",
"created_at": "2026-01-04T09:09:39Z",
"created_at": "2025-12-24T17:41:56Z",
"created_at": "2025-12-24T13:00:34Z",
"created_at": "2025-12-04T17:14:59Z",
"created_at": "2025-12-04T12:15:44Z",
"created_at": "2025-12-01T16:49:29Z",
"created_at": "2025-11-27T10:00:40Z",
"created_at": "2025-11-25T22:24:46Z",
"created_at": "2025-11-25T21:59:57Z",
As you can see, it totally lists quite old runs, too.
Work around that by distrusting the results returned from that GitHub
API call and manually filtering out the too-old runs.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent 81658e8 commit a4e3ff8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments