Find a dispatched run when Forgejo reports an empty event (#321) #322
Loading…
Reference in a new issue
No description provided.
Delete branch "fj-workflow-run-lookup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #321.
fj workflow rundispatched fine, then polled for the new run for 30 seconds and failed with "could not find the triggered run". The lookup only accepted runs whoseeventisworkflow_dispatch, but this Forgejo reports an emptyeventfor dispatched runs. Push and pull request runs report their names, so only dispatches were affected, on any branch (thecl/*branch dispatches and themainones alike). Workflows that take their ownrefinput (device-test-apks.yml with-f ref=...) ran on the default branch, which was the right branch to look on; they hit the same event mismatch.The lookup now accepts an empty event or
workflow_dispatch, still requires the workflow file and branch to match and the run to be new since before the dispatch, and still rejects runs that report another event (push, pull_request, schedule).Tests: unit tests for the matcher, plus
tests/workflow_dispatch_lookup.rsdriving the real command against a mock server (empty event on a feature branch is found;workflow_dispatchis still found; a push run is not adopted). The first one fails on the old code with the exact error. The negative test waits out the 30 second lookup window.Automated Codex review (read-only) of head
6263da81ee.No concrete correctness, security, or test defects found against the supplied standards. Tests were inspected but not run in the read-only sandbox.
BLOCKING: 0
Reviewed head
6263da81eeat 2026-11-12T05:35:29Z by codex exec (read-only sandbox).