Commit 04ff263
committed
trigger-workflow-dispatch: use return_run_details when available
As announced in the GitHub changelog at
https://github.blog/changelog/2026-02-19-workflow-dispatch-api-now-returns-run-ids/
the REST API's workflow dispatch endpoint now supports a boolean
`return_run_details` parameter that, when set to `true`, causes
the response to be a `200 OK` with a JSON body containing
`workflow_run_id`, `run_url`, and `html_url` instead of the
previous `204 No Content`.
This eliminates the need to poll for the workflow run after
triggering it, which was the root cause of the clock skew problems
that this branch set out to fix (the polling required a time-based
search window, and the response timestamp could come after the
workflow run's `created_at`).
The polling fallback is retained for robustness in case the API
regresses or the parameter is not honored. The test mock returns
the new `200` response for all dispatches except
`upload-snapshot.yml`, which still returns the `204`-style
response, so both code paths are exercised.
Assisted-by: Claude Opus 4.6
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent fb14c06 commit 04ff263
File tree
2 files changed
+21
-7
lines changed- GitForWindowsHelper
- __tests__
2 files changed
+21
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
| |||
338 | 344 | | |
339 | 345 | | |
340 | 346 | | |
341 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
342 | 350 | | |
343 | 351 | | |
344 | 352 | | |
345 | 353 | | |
346 | 354 | | |
347 | 355 | | |
348 | | - | |
| 356 | + | |
349 | 357 | | |
350 | 358 | | |
351 | 359 | | |
| |||
834 | 842 | | |
835 | 843 | | |
836 | 844 | | |
837 | | - | |
| 845 | + | |
| 846 | + | |
838 | 847 | | |
839 | 848 | | |
840 | 849 | | |
| |||
1041 | 1050 | | |
1042 | 1051 | | |
1043 | 1052 | | |
1044 | | - | |
| 1053 | + | |
| 1054 | + | |
1045 | 1055 | | |
1046 | 1056 | | |
1047 | 1057 | | |
| |||
0 commit comments