Use smarter way to obtain the exact run upon workflow dispatches#10
Open
dscho wants to merge 2 commits into
Open
Use smarter way to obtain the exact run upon workflow dispatches#10dscho wants to merge 2 commits into
dscho wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.