Skip to content

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

Merged
webstech merged 2 commits into
mainfrom
use-workflow-dispatch-run-details
Jul 22, 2026
Merged

Use smarter way to obtain the exact run upon workflow dispatches#10
webstech merged 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

@webstech webstech left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Way better than polling.

@webstech
webstech merged commit 7263390 into main Jul 22, 2026
1 check passed
@webstech
webstech deleted the use-workflow-dispatch-run-details branch July 22, 2026 18:38
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.

2 participants