---
title: "Notifications, webhooks and CI"
description: "Notifications, webhooks, checks, CI runs and security alerts."
canonical_url: "https://forges.link/reference/notifications"
---
# Notifications, webhooks and CI

> Notifications, webhooks, checks, CI runs and security alerts.

For an operation that the forge lacks, see [Unsupported operations](https://forges.link/reference/provider#unsupported-operations).

## `provider.notifications`

Reading and clearing the notifications of the authenticated account.

### `notifications.list()`

Lists the account's notifications.

**Capability:** `notifications.list`. Anonymous providers reject it.

```ts
notifications.list(options?: NotificationListOptions): ForgeIterable<Notification>
notifications.listPage(options?: NotificationListOptions): Promise<Page<Notification>>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#notificationlistoptions">
        <code>
          NotificationListOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:**

- `notifications.list()`: [`ForgeIterable<Notification>`](https://forges.link/reference/data-model#notification)
- `notifications.listPage()`: [`Promise<Page<Notification>>`](https://forges.link/reference/data-model#notification)

<api-explorer verb="notifications.list">



</api-explorer>

### `notifications.markRead()`

Marks a notification as read.

**Capability:** `notifications.markRead`. Read-only and anonymous providers reject it.

```ts
notifications.markRead(ref: NotificationRef, options?: BaseOptions): Promise<void>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#notificationref">
        <code>
          NotificationRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<void>`

<api-explorer verb="notifications.markRead">



</api-explorer>

### `notifications.markDone()`

Marks a notification as done, which clears it from the inbox where the forge has that state.

**Capability:** `notifications.markDone`. Read-only and anonymous providers reject it.

```ts
notifications.markDone(ref: NotificationRef, options?: NotificationWriteOptions): Promise<void>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#notificationref">
        <code>
          NotificationRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#notificationwriteoptions">
        <code>
          NotificationWriteOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<void>`

<api-explorer verb="notifications.markDone">



</api-explorer>

### `notifications.unsubscribe()`

Stops notifications for the notification's thread, and on some forges also clears the notification.

**Capability:** `notifications.unsubscribe`. Read-only and anonymous providers reject it.

```ts
notifications.unsubscribe(ref: NotificationRef, options?: NotificationWriteOptions): Promise<void>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#notificationref">
        <code>
          NotificationRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#notificationwriteoptions">
        <code>
          NotificationWriteOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<void>`

<api-explorer verb="notifications.unsubscribe">



</api-explorer>

### `notifications.markAllRead()`

Marks every notification as read, or those of one repository.

**Capability:** `notifications.markAllRead`. Read-only and anonymous providers reject it.

```ts
notifications.markAllRead(options?: BulkNotificationOptions): Promise<void>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#bulknotificationoptions">
        <code>
          BulkNotificationOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<void>`

<api-explorer verb="notifications.markAllRead">



</api-explorer>

### `notifications.markAllDone()`

Marks every notification as done, or those of one repository.

**Capability:** `notifications.markAllDone`. Read-only and anonymous providers reject it.

```ts
notifications.markAllDone(options?: BulkNotificationOptions): Promise<void>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#bulknotificationoptions">
        <code>
          BulkNotificationOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<void>`

<api-explorer verb="notifications.markAllDone">



</api-explorer>

### `notifications.unreadCount()`

The number of unread notifications.

**Capability:** `notifications.unreadCount`. Anonymous providers reject it.

```ts
notifications.unreadCount(options?: BaseOptions): Promise<number>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<number>`

<api-explorer verb="notifications.unreadCount">



</api-explorer>

## `provider.sources`

Ways to receive events: polling, webhooks and push subscriptions.

### `sources.subscribe()`

Push delivery over a long-lived connection. Iteration ends when the signal
aborts or the consumer stops iterating; a dropped connection throws
`SubscriptionClosedError` carrying the last cursor. There is no automatic
reconnection.

**Capability:** `sources.subscribe`.

```ts
sources.subscribe(options?: SubscribeOptions): AsyncIterable<SubscriptionItem>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#subscribeoptions">
        <code>
          SubscribeOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`AsyncIterable<SubscriptionItem>`](https://forges.link/reference/data-model#subscriptionitem)

## `provider.webhooks`

Receiving webhook deliveries, and managing the hooks registered on the forge.

### `webhooks.verify()`

Checks a delivery's signature or token against the secret.

**Capability:** `sources.webhook`.

```ts
webhooks.verify(delivery: WebhookDelivery): Promise<boolean>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        delivery
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#webhookdelivery">
        <code>
          WebhookDelivery
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<boolean>`

### `webhooks.ingest()`

Verifies the delivery, then translates it into normalised events.

**Example**

```ts
const events = await provider.webhooks.ingest({
  headers: request.headers,
  body: await request.text(),
})
```

**Capability:** `sources.webhook`.

```ts
webhooks.ingest(delivery: WebhookDelivery): Promise<ForgeEvent[]>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        delivery
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#webhookdelivery">
        <code>
          WebhookDelivery
        </code>
      </a>
    </td>
    
    <td>
      The headers and the raw body of the request, exactly as received.
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<ForgeEvent[]>`](https://forges.link/reference/data-model#forgeevent)

### `webhooks.events`

Normalised kinds and actions this provider can deliver, whatever a hook is subscribed to.

**type:** [`WebhookEventType[]`](https://forges.link/reference/data-model#webhookeventtype)

### `webhooks.list()`

Hooks on a repository, or on an organisation or workspace when `target` is a namespace ref.

**Capability:** `webhooks.list`. Anonymous providers reject it.

```ts
webhooks.list(target: RepoRef, options?: PageOptions): ForgeIterable<Webhook>
webhooks.listPage(target: RepoRef, options?: PageOptions): Promise<Page<Webhook>>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        target
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#reporef">
        <code>
          RepoRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#pageoptions">
        <code>
          PageOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:**

- `webhooks.list()`: [`ForgeIterable<Webhook>`](https://forges.link/reference/data-model#webhook)
- `webhooks.listPage()`: [`Promise<Page<Webhook>>`](https://forges.link/reference/data-model#webhook)

<api-explorer verb="webhooks.list">



</api-explorer>

### `webhooks.create()`

Registers a webhook. A repeat registers a second one, or rejects where the forge refuses a second hook for the same URL.

**Capability:** `webhooks.create`. Read-only and anonymous providers reject it.

```ts
webhooks.create(target: RepoRef, input: WebhookInput, options?: BaseOptions): Promise<Webhook>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        target
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#reporef">
        <code>
          RepoRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        input
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#webhookinput">
        <code>
          WebhookInput
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Webhook>`](https://forges.link/reference/data-model#webhook)

<api-explorer verb="webhooks.create">



</api-explorer>

### `webhooks.update()`

Changes a webhook.

**Capability:** `webhooks.update`. Read-only and anonymous providers reject it.

```ts
webhooks.update(ref: WebhookRef, update: WebhookUpdate, options?: BaseOptions): Promise<Webhook>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#webhookref">
        <code>
          WebhookRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        update
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#webhookupdate">
        <code>
          WebhookUpdate
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Webhook>`](https://forges.link/reference/data-model#webhook)

<api-explorer verb="webhooks.update">



</api-explorer>

### `webhooks.delete()`

Deletes a webhook. A repeat can reject with `NotFoundError` once the webhook is gone.

**Capability:** `webhooks.delete`. Read-only and anonymous providers reject it.

```ts
webhooks.delete(ref: WebhookRef, options?: BaseOptions): Promise<void>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#webhookref">
        <code>
          WebhookRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<void>`

<api-explorer verb="webhooks.delete">



</api-explorer>

### `webhooks.rotateSecret()`

Replaces the signing secret in place. `false` where the forge can only do it by recreating the hook.

**Capability:** `webhooks.rotateSecret`. Read-only and anonymous providers reject it.

```ts
webhooks.rotateSecret(ref: WebhookRef, secret: string, options?: BaseOptions): Promise<Webhook>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#webhookref">
        <code>
          WebhookRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        secret
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Webhook>`](https://forges.link/reference/data-model#webhook)

<api-explorer verb="webhooks.rotateSecret">



</api-explorer>

### `webhooks.deliveries()`

Lists the recent deliveries of a webhook.

**Capability:** `webhooks.deliveries`. Anonymous providers reject it.

```ts
webhooks.deliveries(ref: WebhookRef, options?: PageOptions): ForgeIterable<WebhookDeliveryRecord>
webhooks.deliveriesPage(ref: WebhookRef, options?: PageOptions): Promise<Page<WebhookDeliveryRecord>>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#webhookref">
        <code>
          WebhookRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#pageoptions">
        <code>
          PageOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:**

- `webhooks.deliveries()`: [`ForgeIterable<WebhookDeliveryRecord>`](https://forges.link/reference/data-model#webhookdeliveryrecord)
- `webhooks.deliveriesPage()`: [`Promise<Page<WebhookDeliveryRecord>>`](https://forges.link/reference/data-model#webhookdeliveryrecord)

<api-explorer verb="webhooks.deliveries">



</api-explorer>

### `webhooks.redeliver()`

Sends a past delivery again. A repeat sends it once more.

**Capability:** `webhooks.redeliver`. Read-only and anonymous providers reject it.

```ts
webhooks.redeliver(ref: WebhookDeliveryRef, options?: BaseOptions): Promise<void>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#webhookdeliveryref">
        <code>
          WebhookDeliveryRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<void>`

<api-explorer verb="webhooks.redeliver">



</api-explorer>

## `provider.checks`

Reading and reporting the checks on a commit.

### `checks.list()`

Every check on a commit: check runs, commit statuses, jobs or policy evaluations.

**Capability:** `checks.list`.

```ts
checks.list(repo: RepoRef, sha: string, options?: BaseOptions): Promise<Page<Check>>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        repo
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#reporef">
        <code>
          RepoRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        sha
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Page<Check>>`](https://forges.link/reference/data-model#check)

<api-explorer verb="checks.list">



</api-explorer>

### `checks.get()`

Reads one check. Rejects for a `CheckRef.type` the forge cannot read on its own.

**Capability:** `checks.get`.

```ts
checks.get(ref: CheckRef, options?: BaseOptions): Promise<Check>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#checkref">
        <code>
          CheckRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Check>`](https://forges.link/reference/data-model#check)

### `checks.report()`

Writes a commit status, or a check run where the credential can (GitHub app auth). A repeat writes a second check
run; a second commit status with the same name takes the place of the first, except on GitLab, which rejects a
repeat of a status that is still pending.

**Capability:** `checks.report`. Read-only and anonymous providers reject it.

```ts
checks.report(repo: RepoRef, sha: string, input: CheckReportInput, options?: BaseOptions): Promise<Check>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        repo
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#reporef">
        <code>
          RepoRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        sha
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        input
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#checkreportinput">
        <code>
          CheckReportInput
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Check>`](https://forges.link/reference/data-model#check)

<api-explorer verb="checks.report">



</api-explorer>

### `checks.rerun()`

Re-runs a check. Rejects for a `CheckRef.type` the forge cannot re-run. A repeat can start another run.

**Capability:** `checks.rerun`. Read-only and anonymous providers reject it.

```ts
checks.rerun(ref: CheckRef, options?: BaseOptions): Promise<void>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#checkref">
        <code>
          CheckRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<void>`

<api-explorer verb="checks.rerun">



</api-explorer>

## `provider.ci`

Reading CI runs and their jobs. CI is read-only.

### `ci.runs()`

Lists the CI runs of a repository.

**Capability:** `ci.runs`.

```ts
ci.runs(repo: RepoRef, query?: CiRunQuery): ForgeIterable<CiRun>
ci.runsPage(repo: RepoRef, query?: CiRunQuery): Promise<Page<CiRun>>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        repo
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#reporef">
        <code>
          RepoRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        query?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#cirunquery">
        <code>
          CiRunQuery
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:**

- `ci.runs()`: [`ForgeIterable<CiRun>`](https://forges.link/reference/data-model#cirun)
- `ci.runsPage()`: [`Promise<Page<CiRun>>`](https://forges.link/reference/data-model#cirun)

<api-explorer verb="ci.runs">



</api-explorer>

### `ci.run()`

Reads one CI run.

**Capability:** `ci.run`.

```ts
ci.run(ref: CiRunRef, options?: BaseOptions): Promise<CiRun>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#cirunref">
        <code>
          CiRunRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<CiRun>`](https://forges.link/reference/data-model#cirun)

<api-explorer verb="ci.run">



</api-explorer>

### `ci.jobs()`

Lists the jobs of a CI run.

**Capability:** `ci.jobs`.

```ts
ci.jobs(ref: CiRunRef, options?: PageOptions): ForgeIterable<CiJob>
ci.jobsPage(ref: CiRunRef, options?: PageOptions): Promise<Page<CiJob>>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#cirunref">
        <code>
          CiRunRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#pageoptions">
        <code>
          PageOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:**

- `ci.jobs()`: [`ForgeIterable<CiJob>`](https://forges.link/reference/data-model#cijob)
- `ci.jobsPage()`: [`Promise<Page<CiJob>>`](https://forges.link/reference/data-model#cijob)

<api-explorer verb="ci.jobs">



</api-explorer>

### `ci.job()`

Reads one CI job. Where the forge has no endpoint for it, walks `jobs()` of the ref's `run`, so the ref must name one.

**Capability:** `ci.job`.

```ts
ci.job(ref: CiJobRef, options?: BaseOptions): Promise<CiJob>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#cijobref">
        <code>
          CiJobRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<CiJob>`](https://forges.link/reference/data-model#cijob)

### `ci.log()`

The job's log as it arrives. There is no workflow dispatch: CI is read-only here.

**Capability:** `ci.log`.

```ts
ci.log(ref: CiJobRef, options?: BaseOptions): Promise<ReadableStream<Uint8Array>>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#cijobref">
        <code>
          CiJobRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<ReadableStream<Uint8Array>>`

<api-explorer verb="ci.log">



</api-explorer>

## `provider.securityAlerts`

Reading the security alerts of a repository.

### `securityAlerts.list()`

Lists the security alerts of a repository.

**Capability:** `securityAlerts`.

```ts
securityAlerts.list(repo: RepoRef, options?: SecurityAlertListOptions): ForgeIterable<SecurityAlert>
securityAlerts.listPage(repo: RepoRef, options?: SecurityAlertListOptions): Promise<Page<SecurityAlert>>
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        repo
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#reporef">
        <code>
          RepoRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#securityalertlistoptions">
        <code>
          SecurityAlertListOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:**

- `securityAlerts.list()`: [`ForgeIterable<SecurityAlert>`](https://forges.link/reference/data-model#securityalert)
- `securityAlerts.listPage()`: [`Promise<Page<SecurityAlert>>`](https://forges.link/reference/data-model#securityalert)

<api-explorer verb="securityAlerts.list">



</api-explorer>


## Sitemap

See the full [sitemap](https://forges.link/sitemap.md) for all pages.
