# DocsPrTrigger

**Kind:** Class

**Source:** [`atloria-monorepo/apps/api/src/docs-pr/docs-pr-trigger.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/api/src/docs-pr/docs-pr-trigger.ts#L11)

A dependency-free hop that lets the webhook request a docs-PR check WITHOUT importing
DocsPrModule — which would create a module cycle (WebhookModule -> DocsPrModule ->
GithubAppModule -> forwardRef(WebhookModule)).

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

## Methods

| Method | Signature | Returns |
|---|---|---|
| `register` | `register(fn: (projectId: string) => Promise<unknown>)` | `void` |
| `registerPrClosed` | `registerPrClosed(fn: (repoUrl: string, prNumber: number, merged: boolean) => Promise<unknown>)` | `void` |
| `requestCheck` | `requestCheck(projectId: string)` | `void` |
| `requestPrClosed` | `requestPrClosed(repoUrl: string, prNumber: number, merged: boolean)` | `void` |

## Where it refuses work

- `DocsPrTrigger` stops the work with an early return when `!this.handler`.
- `DocsPrTrigger` stops the work with an early return when `!this.prClosedHandler`.

## Referenced By

- `DocsPrService` (DEPENDS_ON)
- `GithubAppController` (DEPENDS_ON)
- `WebhookService` (DEPENDS_ON)
