---
title: "Issues and pull requests"
description: "Read, create, review and merge issues and pull requests."
canonical_url: "https://forgeslink-3mwmle35v-poetry.vercel.app/reference/threads"
---
# Issues and pull requests

> Read, create, review and merge issues and pull requests.

Issues, pull requests and the other discussion kinds are threads. For an operation that the forge lacks, see [Unsupported operations](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/provider#unsupported-operations).

## `provider.threads`

Issues, pull requests and the other kinds of discussion: reading, creating, commenting, labelling,
reviewing and merging them.

### `get()`

Reads an issue, pull request or discussion by its ref. Rejects with `NotFoundError` when it does not exist or the
credential cannot see it.

**Capability:** `threads.get`. Support differs by thread kind.

```ts
get(ref: ThreadRef, options?: BaseOptions): Promise<Thread>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Thread>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#thread)

<api-explorer verb="threads.get">



</api-explorer>

### `getMany()`

Reads several threads, batched where the forge allows. Failures become per-item warnings, except a rate limit
(`RateLimitedError`) or a rejected credential (`TokenRevokedError`), which reject the call.

**Capability:** `threads.getMany`.

```ts
getMany(refs: ThreadRef[], options?: BaseOptions): Promise<GetManyResult[]>
```

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

<tbody>
  <tr>
    <td>
      <code>
        refs
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef[]
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<GetManyResult[]>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#getmanyresult)

<api-explorer verb="threads.getMany">



</api-explorer>

### `list()`

Lists the threads of a repository.

**Capability:** `threads.list`. Support differs by thread kind.

```ts
list(repo: RepoRef, query?: ThreadQuery): ForgeListing<Thread>
```

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

<tbody>
  <tr>
    <td>
      <code>
        repo
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reporef">
        <code>
          RepoRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        query?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadquery">
        <code>
          ThreadQuery
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `ForgeListing<Thread>`

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



</api-explorer>

### `closingIssues()`

Lists the issues that a pull request closes when it merges, such as those its description names after `Fixes`.
They can be in other repositories. GitHub also lists the issues linked to the pull request by hand.

**Example**

```ts
for await (const issue of provider.threads.closingIssues(pull)) {
  console.log(`#${issue.ref.number} ${issue.title}`)
}
```

**Capability:** `threads.closingIssues`.

```ts
closingIssues(ref: ThreadRef, options?: PageOptions): ForgeListing<Thread>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#pageoptions">
        <code>
          PageOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `ForgeListing<Thread>`

<api-explorer verb="threads.closingIssues">



</api-explorer>

### `closingPullRequests()`

Lists the pull requests that close an issue when they merge, whether they are open, closed or merged.

**Capability:** `threads.closingPullRequests`.

```ts
closingPullRequests(ref: ThreadRef, options?: PageOptions): ForgeListing<Thread>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#pageoptions">
        <code>
          PageOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `ForgeListing<Thread>`

<api-explorer verb="threads.closingPullRequests">



</api-explorer>

### `events()`

Lists the events on a thread, such as comments, label changes and state changes.

**Capability:** `threads.events`.

```ts
events(ref: ThreadRef, options?: ListOptions): ForgeListing<ForgeEvent>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#listoptions">
        <code>
          ListOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `ForgeListing<ForgeEvent>`

<api-explorer verb="threads.events">



</api-explorer>

### `comments()`

Conversation comments. Inline review comments are events, not comments.

**Capability:** `threads.comments`. Support differs by thread kind.

```ts
comments(ref: ThreadRef, options?: ListOptions): ForgeListing<Comment>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#listoptions">
        <code>
          ListOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `ForgeListing<Comment>`

<api-explorer verb="threads.comments">



</api-explorer>

### `getComment()`

Reads one conversation comment, as `comments()` lists them, so not an inline review comment. Where the forge has
no endpoint for it (`capabilities.threads.getComment` is `'emulated'`), it lists the comments of the thread page by page
until the id matches, which costs a request for each page read.

**Capability:** `threads.getComment`. Support differs by thread kind.

```ts
getComment(ref: CommentRef, options?: BaseOptions): Promise<Comment>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#commentref">
        <code>
          CommentRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Comment>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#comment)

### `createComment()`

Adds a comment to a thread. A repeat posts a second comment; to make it safe to retry, mark the body with
`withCommentMarker()` and retry with `upsertComment()`, both from `forges/helpers`.

**Example**

```ts
await provider.threads.createComment(ref, 'Deployed to staging')
```

**Capability:** `threads.createComment`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
createComment(ref: ThreadRef, body: string, options?: BaseOptions): Promise<Comment>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        body
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Comment>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#comment)

<api-explorer verb="threads.createComment">



</api-explorer>

### `updateComment()`

Replaces the body of a comment.

**Capability:** `threads.updateComment`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
updateComment(ref: CommentRef, body: string, options?: BaseOptions): Promise<Comment>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#commentref">
        <code>
          CommentRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        body
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Comment>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#comment)

<api-explorer verb="threads.updateComment">



</api-explorer>

### `deleteComment()`

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

**Capability:** `threads.deleteComment`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
deleteComment(ref: CommentRef, 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://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#commentref">
        <code>
          CommentRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.deleteComment">



</api-explorer>

### `hideComment()`

Hides a comment behind a note of the reason, as GitHub does when it minimises a comment. A repeat leaves it hidden.

**Example**

```ts
await provider.threads.hideComment(comment.ref, 'spam')
```

**Capability:** `threads.hideComment`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
hideComment(ref: CommentRef, reason: HideCommentReason, 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://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#commentref">
        <code>
          CommentRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reason
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#hidecommentreason">
        <code>
          HideCommentReason
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.hideComment">



</api-explorer>

### `unhideComment()`

Shows a hidden comment again. A repeat leaves it shown.

**Capability:** `threads.hideComment`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
unhideComment(ref: CommentRef, 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://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#commentref">
        <code>
          CommentRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.unhideComment">



</api-explorer>

### `create()`

Creates an issue, pull request or discussion. A pull request needs `head` and `base`. A repeat creates a second
thread, though most forges reject a second open pull request from the same `head` to the same `base`.

**Capability:** `threads.create`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
create(repo: RepoRef, input: ThreadInput, options?: BaseOptions): Promise<Thread>
```

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

<tbody>
  <tr>
    <td>
      <code>
        repo
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reporef">
        <code>
          RepoRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        input
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadinput">
        <code>
          ThreadInput
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Thread>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#thread)

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



</api-explorer>

### `update()`

Changes the title, body, state, labels or assignees of a thread. Fields left out stay as they are.
This is one request where the forge accepts every field together. Elsewhere it makes the same calls as
`close()`, `setLabels()` and `setAssignees()`, so a failed call can leave earlier fields changed.
A field the forge cannot set on this kind of thread throws `UnsupportedOperationError` before anything is written.

**Example**

```ts
await provider.threads.update(ref, { state: 'closed', labels: ['wontfix'], assignees: [] })
```

**Capability:** `threads.update`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
update(ref: ThreadRef, input: ThreadUpdate, options?: BaseOptions): Promise<Thread>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        input
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadupdate">
        <code>
          ThreadUpdate
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Thread>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#thread)

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



</api-explorer>

### `setLabels()`

Replaces the thread's labels.

**Capability:** `threads.setLabels`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
setLabels(ref: ThreadRef, labels: string[], options?: BaseOptions): Promise<Label[]>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        string[]
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Label[]>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#label) The labels the thread carries afterwards. GitLab and Azure DevOps report only their names.

<api-explorer verb="threads.setLabels">



</api-explorer>

### `addLabels()`

Adds labels, leaving the rest in place.

**Capability:** `threads.addLabels`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
addLabels(ref: ThreadRef, labels: string[], options?: BaseOptions): Promise<Label[]>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        string[]
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Label[]>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#label) The labels the thread carries afterwards. GitLab reports only their names.

<api-explorer verb="threads.addLabels">



</api-explorer>

### `removeLabels()`

Removes labels, leaving the rest in place. Labels the thread does not carry are ignored.

**Capability:** `threads.removeLabels`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
removeLabels(ref: ThreadRef, labels: string[], options?: BaseOptions): Promise<Label[]>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        labels
      </code>
    </td>
    
    <td>
      <code>
        string[]
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Label[]>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#label) The labels the thread carries afterwards. GitLab reports only their names. Forgejo, Gitea and Gitee read the labels after removing them, and GitHub reads them when it removes none.

<api-explorer verb="threads.removeLabels">



</api-explorer>

### `setMilestone()`

Sets the thread's milestone, by milestone, id or title, or clears it with `undefined`.

**Capability:** `threads.setMilestone`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
setMilestone(ref: ThreadRef, milestone: Milestone | string | undefined, options?: BaseOptions): Promise<Milestone | undefined>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        milestone
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#milestone">
        <code>
          Milestone | string | undefined
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Milestone | undefined>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#milestone) The milestone the thread is in afterwards, or `undefined` once it is cleared.

<api-explorer verb="threads.setMilestone">



</api-explorer>

### `setIssueType()`

Sets the issue's type, by issue type or name, or clears it with `undefined`. GitHub leaves the type as it was,
without an error, when the account cannot push to the repository, so compare the result with what you asked for.

**Example**

```ts
const bug = (await provider.repos.issueTypes(repo)).find(type => type.name === 'Bug')
await provider.threads.setIssueType(ref, bug)
```

**Capability:** `threads.setIssueType`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
setIssueType(ref: ThreadRef, issueType: IssueType | string | undefined, options?: BaseOptions): Promise<IssueType | undefined>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        issueType
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#issuetype">
        <code>
          IssueType | string | undefined
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<IssueType | undefined>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#issuetype) The type the issue has afterwards, or `undefined` once it is cleared.

<api-explorer verb="threads.setIssueType">



</api-explorer>

### `reactions()`

Reactions left on the thread or on one of its comments.

**Capability:** `threads.reactions`. Support differs by thread kind.

```ts
reactions(target: ThreadRef | CommentRef, options?: ListOptions): ForgeListing<Reaction>
```

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

<tbody>
  <tr>
    <td>
      <code>
        target
      </code>
    </td>
    
    <td>
      <code>
        ThreadRef | CommentRef
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#listoptions">
        <code>
          ListOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `ForgeListing<Reaction>`

<api-explorer verb="threads.reactions">



</api-explorer>

### `react()`

Reacts as the authenticated account, to the thread or to one of its comments.

**Capability:** `threads.react`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
react(target: ThreadRef | CommentRef, reaction: ReactionContent, options?: BaseOptions): Promise<void>
```

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

<tbody>
  <tr>
    <td>
      <code>
        target
      </code>
    </td>
    
    <td>
      <code>
        ThreadRef | CommentRef
      </code>
    </td>
    
    <td>
      The thread or comment to react to.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reaction
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reactioncontent">
        <code>
          ReactionContent
        </code>
      </a>
    </td>
    
    <td>
      The reaction to leave.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
    
    <td>
      
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.react">



</api-explorer>

### `unreact()`

Removes the account's reaction from the thread or comment.

**Capability:** `threads.react`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
unreact(target: ThreadRef | CommentRef, reaction: ReactionContent, options?: BaseOptions): Promise<void>
```

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

<tbody>
  <tr>
    <td>
      <code>
        target
      </code>
    </td>
    
    <td>
      <code>
        ThreadRef | CommentRef
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reaction
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reactioncontent">
        <code>
          ReactionContent
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.unreact">



</api-explorer>

### `transfer()`

Moves the thread to another repository, and returns its ref there. A repeat can reject once the thread has moved.

**Capability:** `threads.transfer`. Read-only and anonymous providers reject it.

```ts
transfer(ref: ThreadRef, repo: RepoRef, options?: BaseOptions): Promise<ResolvedThreadRef>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        repo
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reporef">
        <code>
          RepoRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<ResolvedThreadRef>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#resolvedthreadref)

<api-explorer verb="threads.transfer">



</api-explorer>

### `markDuplicate()`

Marks the thread a duplicate of `canonical`, which must be in the same repository on most forges.

**Capability:** `threads.markDuplicate`. Read-only and anonymous providers reject it.

```ts
markDuplicate(ref: ThreadRef, canonical: ThreadRef, 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://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        canonical
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.markDuplicate">



</api-explorer>

### `setAssignees()`

Replaces the thread's assignees.

**Capability:** `threads.setAssignees`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
setAssignees(ref: ThreadRef, assignees: Array<string | Actor>, options?: BaseOptions): Promise<Actor[]>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        assignees
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#actor">
        <code>
          Array<string | Actor>
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Actor[]>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#actor) The accounts assigned afterwards.

<api-explorer verb="threads.setAssignees">



</api-explorer>

### `requestReview()`

Adds reviewers to a pull request.

**Capability:** `threads.requestReview`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
requestReview(ref: ThreadRef, reviewers: Array<string | Actor>, 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://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reviewers
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#actor">
        <code>
          Array<string | Actor>
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.requestReview">



</api-explorer>

### `close()`

Closes a thread, optionally with a reason.

**Capability:** `threads.close`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
close(ref: ThreadRef, options?: CloseOptions): Promise<Thread>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#closeoptions">
        <code>
          CloseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Thread>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#thread) The thread, closed. Tangled reads the thread after writing the state record.

<api-explorer verb="threads.close">



</api-explorer>

### `reopen()`

Reopens a closed thread.

**Capability:** `threads.reopen`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
reopen(ref: ThreadRef, options?: BaseOptions): Promise<Thread>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Thread>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#thread) The thread, open. Tangled reads the thread after writing the state record.

<api-explorer verb="threads.reopen">



</api-explorer>

### `lock()`

Locks the conversation on a thread, so that only collaborators can comment. A repeat leaves it locked.

**Example**

```ts
await provider.threads.lock(ref, { reason: 'too_heated' })
```

**Capability:** `threads.lock`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
lock(ref: ThreadRef, options?: LockOptions): Promise<void>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#lockoptions">
        <code>
          LockOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.lock">



</api-explorer>

### `unlock()`

Unlocks the conversation on a thread. A repeat leaves it unlocked.

**Capability:** `threads.lock`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
unlock(ref: ThreadRef, 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://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.unlock">



</api-explorer>

### `merge()`

Merges a pull request. Without a merge method, the repository must allow exactly one. A repeat rejects once the
pull request has merged, so after a failure read the pull request to see whether it did.

**Example**

```ts
const { status, sha } = await provider.threads.merge(ref, { method: 'squash' })
```

**Capability:** `threads.merge`. Read-only and anonymous providers reject it.

```ts
merge(ref: ThreadRef, options?: MergeOptions): Promise<MergeResult>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
    
    <td>
      The pull request to merge.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#mergeoptions">
        <code>
          MergeOptions
        </code>
      </a>
    </td>
    
    <td>
      The merge method, the head <code>
        sha
      </code>
      
       to expect and the commit message.
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<MergeResult>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#mergeresult) Whether the pull request merged or the forge queued the merge, and the merge commit where the response
reports it. Forgejo, Gitea and Tangled report no merge commit.

<api-explorer verb="threads.merge">



</api-explorer>

### `updateBranch()`

Brings the base branch into a pull request's head branch, by a merge commit or a rebase. A repeat once the branch
is up to date rejects on GitHub, Forgejo and Gitea, and leaves the branch as it is on GitLab.

**Example**

```ts
await provider.threads.updateBranch(ref, { method: 'rebase', sha: pull.branches?.head.sha })
```

**Capability:** `threads.updateBranch`. Read-only and anonymous providers reject it.

```ts
updateBranch(ref: ThreadRef, options?: UpdateBranchOptions): Promise<UpdateBranchResult>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
    
    <td>
      The pull request to update.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#updatebranchoptions">
        <code>
          UpdateBranchOptions
        </code>
      </a>
    </td>
    
    <td>
      The update <code>
        method
      </code>
      
      , and the head <code>
        sha
      </code>
      
       to expect. GitHub checks <code>
        sha
      </code>
      
       as it updates; Forgejo, Gitea and GitLab read the pull request first and compare.
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<UpdateBranchResult>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#updatebranchresult) Whether the branch was updated or the forge queued the update. GitHub and GitLab update in the background,
so read the pull request later to see the new head.

<api-explorer verb="threads.updateBranch">



</api-explorer>

### `subscription()`

The authenticated account's subscription to the thread.

**Capability:** `threads.subscription`. Support differs by thread kind. Anonymous providers reject it.

```ts
subscription(ref: ThreadRef, options?: BaseOptions): Promise<SubscriptionState>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<SubscriptionState>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#subscriptionstate)

<api-explorer verb="threads.subscription">



</api-explorer>

### `subscribe()`

Subscribes the account to the notifications of a thread.

**Capability:** `threads.subscribe`. Read-only and anonymous providers reject it.

```ts
subscribe(ref: ThreadRef, 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://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.subscribe">



</api-explorer>

### `unsubscribe()`

Stops the account's notifications for a thread, leaving existing notifications alone.

**Capability:** `threads.subscribe`. Read-only and anonymous providers reject it.

```ts
unsubscribe(ref: ThreadRef, 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://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

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



</api-explorer>

### `checks()`

Every check on the pull's head, in one page; `warnings` names the sources that could not be read.

**Capability:** `threads.checks`. Support differs by thread kind.

```ts
checks(ref: ThreadRef, options?: BaseOptions): Promise<Page<Check>>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Page<Check>>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#check)

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



</api-explorer>

### `reviews()`

Reviews on a pull request. Forges with approvals but no review objects
(GitLab approvals, Azure DevOps votes, Bitbucket participants) synthesise
one review per approver, with `comments: false`.

**Capability:** `threads.reviews`.

```ts
reviews(ref: ThreadRef, options?: PageOptions): ForgeListing<Review>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#pageoptions">
        <code>
          PageOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `ForgeListing<Review>`

<api-explorer verb="threads.reviews">



</api-explorer>

### `getReview()`

Reads one review by its ref. Where the forge has no endpoint for it (`capabilities.threads.getReview` is `'emulated'`),
it lists the reviews of the pull request page by page until the id matches, which costs a request for each page
read.

**Capability:** `threads.getReview`.

```ts
getReview(ref: ReviewRef, options?: BaseOptions): Promise<Review>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reviewref">
        <code>
          ReviewRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Review>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#review)

### `createReview()`

Creates a review. Without `event` the review is pending where the forge has pending reviews. A repeat adds a second review.

**Capability:** `threads.createReview`. Read-only and anonymous providers reject it.

```ts
createReview(ref: ThreadRef, input: ReviewInput, options?: BaseOptions): Promise<Review>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        input
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reviewinput">
        <code>
          ReviewInput
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Review>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#review)

<api-explorer verb="threads.createReview">



</api-explorer>

### `submitReview()`

Submits a pending review. A repeat can reject once the review is submitted.

**Capability:** `threads.submitReview`. Read-only and anonymous providers reject it.

```ts
submitReview(ref: ReviewRef, event: ReviewEvent, body?: string, options?: BaseOptions): Promise<Review>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reviewref">
        <code>
          ReviewRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        event
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reviewevent">
        <code>
          ReviewEvent
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        body?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Review>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#review)

<api-explorer verb="threads.submitReview">



</api-explorer>

### `approve()`

Approves without merging; `createReview({ event: 'approve' })` with nothing else to say. A repeat adds a second
approving review where the forge keeps reviews, and sets the same vote or rejects where it keeps votes.

**Capability:** `threads.approve`. Read-only and anonymous providers reject it.

```ts
approve(ref: ThreadRef, body?: string, options?: BaseOptions): Promise<Review>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        body?
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Review>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#review) The approval, as `createReview()` returns it. GitLab reads the signed-in account once per provider to
pick the approval out of a response with more than one approver.

<api-explorer verb="threads.approve">



</api-explorer>

### `files()`

Files a pull request changes, with a per-file `patch` where the forge returns one.

**Capability:** `threads.files`.

```ts
files(ref: ThreadRef, options?: PageOptions): ForgeListing<ChangedFile>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#pageoptions">
        <code>
          PageOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `ForgeListing<ChangedFile>`

<api-explorer verb="threads.files">



</api-explorer>

### `commits()`

Commits on a pull request.

**Capability:** `threads.commits`.

```ts
commits(ref: ThreadRef, options?: PageOptions): ForgeListing<Commit>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#pageoptions">
        <code>
          PageOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `ForgeListing<Commit>`

<api-explorer verb="threads.commits">



</api-explorer>

### `replyToReviewComment()`

Replies to a review comment in its conversation. Pass the comment as `reviews()` or `comments()` returns it:
GitHub uses its `inReplyTo` or `ref`, Gitea its `ref`, and GitLab the discussion in its `thread`. A repeat posts a
second reply.

**Capability:** `threads.replyToReviewComment`. Read-only and anonymous providers reject it.

```ts
replyToReviewComment(ref: ThreadRef, comment: Pick<ReviewComment, 'ref' | 'thread' | 'inReplyTo'>, body: string, options?: BaseOptions): Promise<ReviewComment>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        comment
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reviewcomment">
        <code>
          Pick<ReviewComment, 'ref' | 'thread' | 'inReplyTo'>
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        body
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<ReviewComment>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reviewcomment)

<api-explorer verb="threads.replyToReviewComment">



</api-explorer>

### `reviewThreads()`

Review conversations on a pull request with their comments; `state` keeps only the resolved or the unresolved ones.

**Capability:** `threads.reviewThreads`.

```ts
reviewThreads(ref: ThreadRef, options?: ReviewThreadListOptions): ForgeListing<ReviewThread>
```

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

<tbody>
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#reviewthreadlistoptions">
        <code>
          ReviewThreadListOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `ForgeListing<ReviewThread>`

<api-explorer verb="threads.reviewThreads">



</api-explorer>

### `resolveReviewThread()`

Resolves a review conversation, by the id on `ReviewComment.thread` or `Comment.thread`.

**Capability:** `threads.resolveReviewThread`. Read-only and anonymous providers reject it.

```ts
resolveReviewThread(ref: ThreadRef, id: string, 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://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.resolveReviewThread">



</api-explorer>

### `unresolveReviewThread()`

Reopens a resolved review conversation, by the id on `ReviewComment.thread` or `Comment.thread`.

**Capability:** `threads.resolveReviewThread`. Read-only and anonymous providers reject it.

```ts
unresolveReviewThread(ref: ThreadRef, id: string, 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://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

<api-explorer verb="threads.unresolveReviewThread">



</api-explorer>

## Comment helpers

Import from `forges/helpers`. They call the methods of `provider.threads`, so they work with any provider.

### `UpsertCommentInput`

What [`upsertComment`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/threads#upsertcomment) needs.

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

<tbody>
  <tr>
    <td>
      <code>
        key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Identifies the comment to replace across runs. It is written into the body as an HTML comment, so it is invisible when rendered but matchable on the next run.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        body
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        since?
      </code>
    </td>
    
    <td>
      <code>
        Date
      </code>
    </td>
    
    <td>
      Only comments updated at or after this time are searched for the key. When retrying a change, pass the time of its first attempt, less a margin for clock skew, so the retry lists only recent comments. A comment with the same key from before <code>
        since
      </code>
      
       is not found, and a new one is created.
    </td>
  </tr>
</tbody>
</table>

### `UpsertCommentResult`

What [`upsertComment`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/threads#upsertcomment) did.

**type parameters:** `T extends Comment | CommitComment = Comment`

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

<tbody>
  <tr>
    <td>
      <code>
        comment
      </code>
    </td>
    
    <td>
      <code>
        T
      </code>
    </td>
    
    <td>
      The comment that was created or edited.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        created
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
      
       when a comment with the same key already existed, and was edited or already had the body.
    </td>
  </tr>
</tbody>
</table>

### `commentMarker()`

The hidden marker that [`upsertComment`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/threads#upsertcomment) writes into a comment body to
find it again. It renders as nothing on every forge that renders Markdown
as HTML.

```ts
function commentMarker(key: string): string
```

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

<tbody>
  <tr>
    <td>
      <code>
        key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `string`

### `hasCommentMarker()`

Whether `body` carries the marker for `key`.

```ts
function hasCommentMarker(body: string, key: string): boolean
```

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

<tbody>
  <tr>
    <td>
      <code>
        body
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `boolean`

### `withCommentMarker()`

`body` with the marker for `key` at the end, unless it carries it already. Post it with `threads.createComment()` so that
[`upsertComment`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/threads#upsertcomment) with the same key edits that comment instead of posting another.

**Example**

```ts
await provider.threads.createComment(ref, withCommentMarker('Deployed to staging', mutationId))
```

```ts
function withCommentMarker(body: string, key: string): string
```

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

<tbody>
  <tr>
    <td>
      <code>
        body
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        key
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
  </tr>
</tbody>
</table>

**Returns:** `string`

### `upsertComment()`

Creates the comment, or edits the one an earlier call with the same `key` left behind, unless that one already has
the same body. The key is carried in the body as a hidden marker; see [`commentMarker`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/threads#commentmarker). It lists the comments
of the thread on every call, which `since` bounds, so the provider needs `threads.comments()`, `threads.createComment()`
and `threads.updateComment()` for the kind of thread. On a commit it uses `commits.comments()`, `commits.createComment()`
and `commits.updateComment()`, and reads every comment of the commit.

**Example**

```ts
import { upsertComment } from 'forges/helpers'

await upsertComment(provider, ref, { key: 'preview', body: 'Preview: https://pr-42.example.com' })
```

**Overload 1 of 2**

```ts
function upsertComment(provider: ForgeProvider, ref: CommitRef, input: UpsertCommentInput, options?: BaseOptions): Promise<UpsertCommentResult<CommitComment>>
```

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

<tbody>
  <tr>
    <td>
      <code>
        provider
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/provider">
        <code>
          ForgeProvider
        </code>
      </a>
    </td>
    
    <td>
      The provider to comment with.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#commitref">
        <code>
          CommitRef
        </code>
      </a>
    </td>
    
    <td>
      The thread or commit to comment on.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        input
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/threads#upsertcommentinput">
        <code>
          UpsertCommentInput
        </code>
      </a>
    </td>
    
    <td>
      The <code>
        key
      </code>
      
       that identifies the comment across runs, its <code>
        body
      </code>
      
      , and <code>
        since
      </code>
      
       to look at recent comments only.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
    
    <td>
      
    </td>
  </tr>
</tbody>
</table>

**Returns:** `Promise<UpsertCommentResult<CommitComment>>`

**Overload 2 of 2**

```ts
function upsertComment(provider: ForgeProvider, ref: ThreadRef, input: UpsertCommentInput, options?: BaseOptions): Promise<UpsertCommentResult>
```

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

<tbody>
  <tr>
    <td>
      <code>
        provider
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/provider">
        <code>
          ForgeProvider
        </code>
      </a>
    </td>
    
    <td>
      The provider to comment with.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
    
    <td>
      The thread or commit to comment on.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        input
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/threads#upsertcommentinput">
        <code>
          UpsertCommentInput
        </code>
      </a>
    </td>
    
    <td>
      The <code>
        key
      </code>
      
       that identifies the comment across runs, its <code>
        body
      </code>
      
      , and <code>
        since
      </code>
      
       to look at recent comments only.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forgeslink-3mwmle35v-poetry.vercel.app/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
    
    <td>
      
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<UpsertCommentResult>`](https://forgeslink-3mwmle35v-poetry.vercel.app/reference/threads#upsertcommentresult)


## Sitemap

See the full [sitemap](https://forgeslink-3mwmle35v-poetry.vercel.app/sitemap.md) for all pages.
