Skip to content

GitSyncTrigger

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/apps/api/src/git-sync/git-sync-trigger.ts

A dependency-free hop that lets the GitHub App webhook hand a push payload to the git-sync ingest WITHOUT importing GitSyncModule — which would create a module cycle (GithubAppModule → GitSyncModule → GithubAppModule). Exactly the DocsPrTrigger pattern.

GitSyncIngestService registers the real handler on init. If the feature module isn't loaded, requestPush is a silent no-op — wiring this into the webhook can never break it.

Methods

MethodSignatureReturns
registerregister(fn: (payload: unknown) => Promise<unknown>)void
requestPushrequestPush(payload: unknown)void

Where it refuses work

  • GitSyncTrigger stops the work with an early return when !this.handler.

Referenced By

  • GitSyncIngestService (DEPENDS_ON)
  • GithubAppController (DEPENDS_ON)

Was this page helpful?

Download as PDF