feat(surface): github.check_run and github.issue_comment triggers

Merged
KH
2mo ago
+61-15

Summary

Regenerates the GitHub trigger surface with two events a PR-reviewer flow needs:

flow('pr-reviewer')
  .on(github.check_run('completed'), …)     // merge-on-green
  .on(github.issue_comment('created'), …)  // "@relay fix conflicts" directives

providerEventTypes.github now lists check_run and issue_comment, so flows check admits those subscriptions (verified: a flow using all three of check_run, issue_comment, pull_request passes preflight with this build and is refused github.check_run is not a function on main).

Depends on

AgentWorkforce/relayfile-adapters#279 — adds the keys to the core mapping shipped in @relayfile/adapter-core. The generated files here were produced from that branch's packages/core/mappings alone (exactly what the tarball carries), so after that lands and is released:

  1. bump @relayfile/adapter-core in packages/sdk/package.json to the release containing #279
  2. node scripts/generate-triggers.mjs --check → Checked 2 provider trigger modules
  3. mark ready

Until then tests/generate-triggers.test.ts › reproduces all checked-in modules from the pinned adapter mappings fails by construction — hence draft.

Test plan

  • packages/surface: typecheck, build, tests/triggers-github-events.test.ts (new) + flow.test.ts
  • packages/sdk: typecheck; provider-trigger-executor, provider-trigger-contract, check-triggers suites green against a built kernel
  • flows check on a flow subscribing to check_run/issue_comment/pull_request → CHECK PASSED
  • generate-triggers.mjs --check — adapter-core pinned to 0.5.25 (ships #279); regenerated from the installed tarball, byte-identical to the branch-generated files

🤖 Generated with Claude Code


Summary by cubic

Adds github.check_run and github.issue_comment triggers for PR-reviewer flows, and aligns flows deploy with Cloud's GitHub events setting.

  • Regenerates the GitHub trigger surface; providerEventTypes.github now lists check_run and issue_comment, both accepting an optional action filter like github.pull_request.
  • flows deploy --on github:events=... accepts issues or pull_request, lowercasing the value before it is sent so PULL_REQUEST no longer passes the CLI and then fails at Cloud; docs/CLOUD.md describes the pull-request run's input.pullRequest.
  • Pins @relayfile/adapter-core to 0.5.25, which ships the upstream mappings, so generate-triggers.mjs --check passes.

Also in this PR

flows deploy … --on github:events=pull_request[,labels=…] — the CLI now accepts the events setting introduced by AgentWorkforce/cloud#3772 (validated to issues | pull_request), and docs/CLOUD.md describes the pull-request run's input.pullRequest. This part has no dependency on the adapter-core release.


[!NOTE]
Low Risk
SDK-side trigger parsing and generated surface additions; no changes to auth, credentials, or runtime execution paths beyond new allowed trigger types and deploy payload fields.

Overview
Adds github.check_run and github.issue_comment to the generated GitHub trigger API (optional action filter, same pattern as pull_request), updates providerEventTypes.github so flows check accepts those subscriptions, and documents them in the triggers README. Regeneration is tied to @relayfile/adapter-core 0.5.25.

Separately, flows deploy --on github:… now accepts an events setting (issues or pull_request, normalized to lowercase in parseTriggerSource), with tests and docs/CLOUD.md describing pull-request listener behavior and input.pullRequest on runs.

Reviewed by Cursor Bugbot for commit baa4f5e737a77b43d8b1e51ca4d5a2b912ec74d8. Bugbot is set up for automated code reviews on this repo. Configure here.


Agent Relay sessions

  • claude session a274eed5 · opened via gh pr create · last active 2026-09-17