Skip to content

Use smarter way to obtain the exact run upon workflow dispatches#10

Open
dscho wants to merge 2 commits into
mainfrom
use-workflow-dispatch-run-details
Open

Use smarter way to obtain the exact run upon workflow dispatches#10
dscho wants to merge 2 commits into
mainfrom
use-workflow-dispatch-run-details

Conversation

@dscho

@dscho dscho commented Jul 21, 2026

Copy link
Copy Markdown
Member

Previously, when we triggered runs via workflow_dispatch, we had to poll workflow runs to know which run was triggered. That fragile strategy is no longer necessary.

This is a companion of git-for-windows/gfw-helper-github-app#197.

dscho added 2 commits July 21, 2026 14:28
A workflow run can be timestamped slightly before the dispatch response.
Since GitGitGadget uses that response's `Date` header as the polling lower
bound, the run can be excluded.

Allow five seconds of leeway so the dispatched run remains eligible for
polling.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
GitGitGadget must identify the workflow run created by each dispatch. The
old response omitted that identity, forcing a time-based poll that is
sensitive to clock skew.

GitHub's workflow dispatch API can now return the run ID when
`return_run_details` is set; see
https://github.blog/changelog/2026-02-19-workflow-dispatch-api-now-returns-run-ids/.
Use those details directly when available.

Retain polling for responses without run details, using the existing
clock-skew leeway.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
dscho requested a review from webstech July 21, 2026 16:44
@dscho dscho self-assigned this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant