agent: honor the caller's event under workflow_call (#2) #6
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-2"
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?
Fixes the automatic-trigger no-op: intent resolution could not handle runs delegated through a reusable workflow.
What changed
glue/src/event.ts— neweffectiveEventName(): whenGITHUB_EVENT_NAMEisworkflow_call, the event family is derived from the payload shape inGITHUB_EVENT_PATH(which still holds the caller's originalissue_comment/issuesevent):comment→issue_comment,issue→issues, otherwiseworkflow_call(unchanged skip).resolveIntent()itself is untouched.glue/src/smoke.ts— 9 regression cases covering theworkflow_callpath: plan command, plain comment on agent-labeled issue,buildlabel,openedwithagentlabel, irrelevant label skip, non-issue payload skip, bot-author self-guard, and explicitAGENT_MODEprecedence.Verification
npm run check(tsc) clean;npm test: all PASS — 9 new cases + the 14 pre-existing ones, no regression.agent-imagedefault in.forgejo/workflows/agent.yml, then onserious-devs/test_factory_aicomment on anagent-labeled issue without any manual dispatch — the run should logtrigger: …and post a plan reply (no moreunhandled event workflow_call/created — skipping).Wiki updates on merge
Limitationspage — once the new agent image tag is built, pushed and theagent-imagedefault updated (the fix is inert until then): remove the "Automatic triggers fire but the agent skips" bullet from the "Trigger quirks" section (resolved by this PR). Keep the "agent job logs HTTP 500" bullet (tracked in #5). If merged before the image is repinned, keep the bullet but note the fix is pending deployment.Workflowpage — nothing to change: the entry-points table already describes automatic triggers as designed; they will now genuinely work.Homepage — nothing to change.Closes #2
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.