Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/orb/relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ import { decryptSecret, encryptSecret } from "../utils/crypto";
// The events a brokered container needs to review/act on. Installation-lifecycle + other Orb-internal events are
// deliberately NOT forwarded (the container runs under the CENTRAL Orb App, not its own, so it must not treat
// those as its own installation state).
// check_run is intentionally excluded: CI emits one per job per repo (thousands/day), making it a firehose that
// would flood self-host containers. check_suite fires once per push/PR sync and is sufficient — the engine
// re-reviews on suite completion (#1371: processors.ts handles both check_run and check_suite for that trigger,
// so dropping check_run here is lossless for brokered containers).
const RELAY_FORWARD_EVENTS = new Set([
"pull_request",
"pull_request_review",
"pull_request_review_comment",
"check_run",
"check_suite",
"issue_comment",
"issues",
Expand Down
1 change: 1 addition & 0 deletions test/integration/orb-relay.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ describe("forwardOrbEvent", () => {
it("SKIPS a non-forwardable event, a missing installation, and an enrolled install with no relay registered", async () => {
const e = brokeredEnv();
expect(await forwardOrbEvent(e, { eventName: "installation", installationId: 1, deliveryId: "d", rawBody: "{}" })).toBe("skipped");
expect(await forwardOrbEvent(e, { eventName: "check_run", installationId: 1, deliveryId: "d", rawBody: "{}" })).toBe("skipped"); // excluded: CI firehose
expect(await forwardOrbEvent(e, { eventName: "pull_request", installationId: null, deliveryId: "d", rawBody: "{}" })).toBe("skipped");
await enroll(e, 801);
expect(await forwardOrbEvent(e, { eventName: "pull_request", installationId: 801, deliveryId: "d", rawBody: "{}" })).toBe("skipped"); // enrolled, no relay
Expand Down
Loading