---
title: "Issues and pull requests"
description: "Read, create, review and merge issues and pull requests."
canonical_url: "https://forges.link/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://forges.link/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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </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<Thread>`](https://forges.link/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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef[]
        </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<GetManyResult[]>`](https://forges.link/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): ForgeIterable<Thread>
listPage(repo: RepoRef, query?: ThreadQuery): Promise<Page<Thread>>
```

<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#threadquery">
        <code>
          ThreadQuery
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:**

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

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



</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): ForgeIterable<ForgeEvent>
eventsPage(ref: ThreadRef, options?: ListOptions): Promise<Page<ForgeEvent>>
```

<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#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#listoptions">
        <code>
          ListOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:**

- `events()`: [`ForgeIterable<ForgeEvent>`](https://forges.link/reference/data-model#forgeevent)
- `eventsPage()`: [`Promise<Page<ForgeEvent>>`](https://forges.link/reference/data-model#forgeevent)

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



</api-explorer>

### `comments()`

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

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

```ts
comments(ref: ThreadRef, options?: ListOptions): ForgeIterable<Comment>
commentsPage(ref: ThreadRef, options?: ListOptions): Promise<Page<Comment>>
```

<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#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/requests#listoptions">
        <code>
          ListOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:**

- `comments()`: [`ForgeIterable<Comment>`](https://forges.link/reference/data-model#comment)
- `commentsPage()`: [`Promise<Page<Comment>>`](https://forges.link/reference/data-model#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, walks `comments()` until the id matches.

**Capability:** `comments.get`. 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://forges.link/reference/data-model#commentref">
        <code>
          CommentRef
        </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<Comment>`](https://forges.link/reference/data-model#comment)

### `comment()`

Adds a comment to a thread. A repeat posts a second comment, so pass a `key` and retry with `upsertComment()`.

**Example**

```ts
await provider.threads.comment(ref, 'Deployed to staging', { key: mutationId })
```

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

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

<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#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://forges.link/reference/data-model#commentoptions">
        <code>
          CommentOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

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



</api-explorer>

### `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://forges.link/reference/data-model#commentmarker). Composed from `comments`, `comment` and
`editComment`, so it costs a listing on every call, which `since` bounds.

**Example**

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

**Capability:** `writes.upsertComment`. Read-only and anonymous providers reject it.

```ts
upsertComment(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>
        ref
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
    
    <td>
      The thread to comment on.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        input
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#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://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
    
    <td>
      
    </td>
  </tr>
</tbody>
</table>

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

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



</api-explorer>

### `editComment()`

Replaces the body of a comment.

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

```ts
editComment(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://forges.link/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://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

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



</api-explorer>

### `deleteComment()`

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

**Capability:** `comments.delete`. 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://forges.link/reference/data-model#commentref">
        <code>
          CommentRef
        </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="threads.deleteComment">



</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:** `writes.create`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
create(repo: RepoRef, input: ThreadCreateInput, 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://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#threadcreateinput">
        <code>
          ThreadCreateInput
        </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<Thread>`](https://forges.link/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:** `writes.update`. Support differs by thread kind. Read-only and anonymous providers reject it.

```ts
update(ref: ThreadRef, input: ThreadUpdateInput, 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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        input
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#threadupdateinput">
        <code>
          ThreadUpdateInput
        </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<Thread>`](https://forges.link/reference/data-model#thread)

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



</api-explorer>

### `setLabels()`

Replaces the thread's labels.

**Capability:** `writes.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://forges.link/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://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Label[]>`](https://forges.link/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:** `writes.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://forges.link/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://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Label[]>`](https://forges.link/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:** `writes.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://forges.link/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://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Label[]>`](https://forges.link/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:** `writes.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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        milestone
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#milestone">
        <code>
          Milestone | string | undefined
        </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<Milestone | undefined>`](https://forges.link/reference/data-model#milestone) The milestone the thread is in afterwards, or `undefined` once it is cleared.

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



</api-explorer>

### `reactions()`

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

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

```ts
reactions(target: ThreadRef | CommentRef, options?: ListOptions): ForgeIterable<Reaction>
reactionsPage(target: ThreadRef | CommentRef, options?: ListOptions): Promise<Page<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://forges.link/reference/requests#listoptions">
        <code>
          ListOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:**

- `reactions()`: [`ForgeIterable<Reaction>`](https://forges.link/reference/data-model#reaction)
- `reactionsPage()`: [`Promise<Page<Reaction>>`](https://forges.link/reference/data-model#reaction)

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



</api-explorer>

### `react()`

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

**Capability:** `writes.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://forges.link/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://forges.link/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:** `writes.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://forges.link/reference/data-model#reactioncontent">
        <code>
          ReactionContent
        </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="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:** `writes.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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <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/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<ResolvedThreadRef>`](https://forges.link/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:** `writes.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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        canonical
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </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="threads.markDuplicate">



</api-explorer>

### `setAssignees()`

Replaces the thread's assignees.

**Capability:** `writes.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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        assignees
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#actor">
        <code>
          Array<string | Actor>
        </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<Actor[]>`](https://forges.link/reference/data-model#actor) The accounts assigned afterwards.

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



</api-explorer>

### `requestReview()`

Adds reviewers to a pull request.

**Capability:** `writes.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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        reviewers
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#actor">
        <code>
          Array<string | Actor>
        </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="threads.requestReview">



</api-explorer>

### `close()`

Closes a thread, optionally with a reason.

**Capability:** `writes.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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#closeoptions">
        <code>
          CloseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Thread>`](https://forges.link/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:** `writes.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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </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<Thread>`](https://forges.link/reference/data-model#thread) The thread, open. Tangled reads the thread after writing the state record.

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



</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:** `writes.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://forges.link/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://forges.link/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://forges.link/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>

### `approveAndMerge()`

Approves, then merges, and resolves as `merge()` does. The merge method is checked before the approval is sent.
A repeat approves again, as `approve()` does, so once the approval is in, retry with `merge()`.

**Capability:** `writes.approveAndMerge`. Read-only and anonymous providers reject it.

```ts
approveAndMerge(ref: ThreadRef, options?: ApproveAndMergeOptions): Promise<MergeResult>
```

<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#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        options?
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#approveandmergeoptions">
        <code>
          ApproveAndMergeOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

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



</api-explorer>

### `subscription()`

The authenticated account's subscription to the thread.

**Capability:** `subscriptions.get`. 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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </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<SubscriptionState>`](https://forges.link/reference/data-model#subscriptionstate)

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



</api-explorer>

### `subscribe()`

Subscribes the account to the notifications of a thread.

**Capability:** `subscriptions.set`. 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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </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="threads.subscribe">



</api-explorer>

### `unsubscribe()`

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

**Capability:** `subscriptions.set`. 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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </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="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:** `checks.thread`. 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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </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<Page<Check>>`](https://forges.link/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:** `reviews.list`.

```ts
reviews(ref: ThreadRef, options?: PageOptions): ForgeIterable<Review>
reviewsPage(ref: ThreadRef, options?: PageOptions): Promise<Page<Review>>
```

<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#threadref">
        <code>
          ThreadRef
        </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:**

- `reviews()`: [`ForgeIterable<Review>`](https://forges.link/reference/data-model#review)
- `reviewsPage()`: [`Promise<Page<Review>>`](https://forges.link/reference/data-model#review)

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



</api-explorer>

### `getReview()`

Reads one review by its ref. Where the forge has no endpoint for it, walks `reviews()` until the id matches.

**Capability:** `reviews.get`.

```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://forges.link/reference/data-model#reviewref">
        <code>
          ReviewRef
        </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<Review>`](https://forges.link/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:** `reviews.create`. 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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        input
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/reference/data-model#reviewinput">
        <code>
          ReviewInput
        </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<Review>`](https://forges.link/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:** `reviews.submit`. 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://forges.link/reference/data-model#reviewref">
        <code>
          ReviewRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        event
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/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://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Review>`](https://forges.link/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:** `reviews.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://forges.link/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://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

**Returns:** [`Promise<Review>`](https://forges.link/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:** `contents.threadFiles`.

```ts
files(ref: ThreadRef, options?: PageOptions): ForgeIterable<ChangedFile>
filesPage(ref: ThreadRef, options?: PageOptions): Promise<Page<ChangedFile>>
```

<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#threadref">
        <code>
          ThreadRef
        </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:**

- `files()`: [`ForgeIterable<ChangedFile>`](https://forges.link/reference/data-model#changedfile)
- `filesPage()`: [`Promise<Page<ChangedFile>>`](https://forges.link/reference/data-model#changedfile)

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



</api-explorer>

### `commits()`

Commits on a pull request.

**Capability:** `contents.threadCommits`.

```ts
commits(ref: ThreadRef, options?: PageOptions): ForgeIterable<Commit>
commitsPage(ref: ThreadRef, options?: PageOptions): Promise<Page<Commit>>
```

<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#threadref">
        <code>
          ThreadRef
        </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:**

- `commits()`: [`ForgeIterable<Commit>`](https://forges.link/reference/data-model#commit)
- `commitsPage()`: [`Promise<Page<Commit>>`](https://forges.link/reference/data-model#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:** `reviews.reply`. 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://forges.link/reference/data-model#threadref">
        <code>
          ThreadRef
        </code>
      </a>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        comment
      </code>
    </td>
    
    <td>
      <a href="https://forges.link/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://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

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



</api-explorer>

### `resolveReviewThread()`

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

**Capability:** `reviews.resolveThread`. 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://forges.link/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://forges.link/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:** `reviews.resolveThread`. 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://forges.link/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://forges.link/reference/requests#baseoptions">
        <code>
          BaseOptions
        </code>
      </a>
    </td>
  </tr>
</tbody>
</table>

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

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



</api-explorer>


## Sitemap

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