Skip to content

feat(github): declare and route pull_request ready_for_review, labeled, unlabeled - #283

Merged
kjgbot merged 1 commit into
mainfrom
feat/babysitter-github-events
Sep 20, 2026
Merged

kjgbot merged 1 commit into
mainfrom
feat/babysitter-github-events

Conversation

@AgentRelayBot

@AgentRelayBot AgentRelayBot commented Sep 20, 2026 •

Copy link
Copy Markdown

Why

@relayfile/adapter-github declared five pull_request actions (opened, synchronize, edited, reopened, closed). It did not declare ready_for_review, labeled or unlabeled, so those three were absent from DEFAULT_GITHUB_EVENTS, from supportedEvents(), from the router's EVENT_MAP, and therefore from the generated KNOWN_TRIGGER_CATALOG.

That gap blocks two downstream consumers:

  • Babysitter v2 (AgentWorkforce/flows feat/babysitter-v2@8825104b) declares an eleven-subscription resident wake contract. Three of the eleven are exactly these actions — a draft leaving draft state, and skip/merge-policy labels moving.
  • Cloud consumes this catalog as the source of truth for GitHub trigger validity. A trigger naming an undeclared action is refused at deploy time, which is correct behaviour and makes this package the blocker.

What changed

Three event names, added in the four places the adapter contract requires them:

  • packages/github/src/types.ts — DEFAULT_GITHUB_EVENTS
  • packages/github/src/config.ts — DEFAULT_SUPPORTED_EVENTS, each with the authoring note the surrounding entries carry
  • packages/github/src/webhook/event-map.ts — EVENT_MAP, all three routed to updatePullRequest (none is a create or a close; each refreshes the existing pull-request record)
  • packages/core/src/triggers/catalog.generated.{json,ts} — regenerated, not hand-edited

Plus the router tests that cover the new routes, and a CHANGELOG.md [Unreleased] entry.

Notes for review

  • No version bump, per this repo's AGENTS.md: versions are bumped by the publish workflow, not in feature PRs.
  • Original commit preserved. This is codex/babysitter-github-events@f43e294b rebased onto current main. The only rebase conflict was CHANGELOG.md, where main had added a GitLab writeback entry under the same ### Added heading; both entries are kept. Authorship of the original commit is unchanged.
  • ready_for_review/labeled/unlabeled require no webhook subscription change anywhere: GitHub subscribes at the top-level pull_request event name and actions are not separately subscribable. These deliveries already reach consumers; this PR only makes them declared, and therefore routable and authorable.

Verification

Run against this branch after a full npx turbo build:

  • npx turbo test --filter=@relayfile/adapter-github — 402 pass, 0 fail
  • node packages/core/dist/src/cli.js triggers check — in sync (the committed catalog matches a regenerate; note a partial build reports a false "stale", a full build is required)
  • npx turbo build — 52/52 successful

Downstream

AgentWorkforce/cloud branch feat/babysitter-webhook-routing pins @relayfile/adapter-github 0.5.11 and is blocked on this publishing. Verified both directions against a local build of this branch: 4 failed / 187 passed on the published 0.5.10 line, 191 passed with these three events present.

Publishing 0.5.11 after this merges is the remaining action.

🤖 Generated with Claude Code


Note

Low Risk
Additive catalog and routing aligned with existing PR update handlers; no auth, subscription, or breaking contract changes.

Overview
@relayfile/adapter-github now treats pull_request.ready_for_review, pull_request.labeled, and pull_request.unlabeled as first-class triggers: they are listed in default/supported event sets, exposed via supportedEvents(), and wired in the webhook EVENT_MAP to updatePullRequest (same refresh path as synchronize/edited/reopened).

The core KNOWN_TRIGGER_CATALOG is regenerated so Cloud and persona authors can deploy triggers on draft-to-ready and PR label transitions without “undeclared event” failures. Router and scaffold tests cover the new routes; CHANGELOG.md documents the addition.

No new GitHub subscription is required—deliveries already arrive on the top-level pull_request event; this change only declares and routes them.

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

Review in cubic

Session-Id: 2fc28d5e-2a7c-4168-9cdf-9460746c0212
@coderabbitai

coderabbitai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: b0baf7f6-6806-4706-a9f1-482c3b74a5fc


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@kjgbot
kjgbot merged commit 259740c into main Sep 20, 2026
5 checks passed
@kjgbot
kjgbot deleted the feat/babysitter-github-events branch September 20, 2026 23:40
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