# dev.knotless.pull

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

A request to merge a branch into a repository, kept in the requester's account.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.pull)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.pull/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.pull/examples)

## Definitions

### `dev.knotless.pull#head`

**Type**: `object`

Where the changes to merge are.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `branch` | `string` | Yes | Without refs/heads/. |
| `repo` | `ref` → `dev.knotless.defs#repoRef` | Yes | The repository holding the branch: the target, or a fork. |

### `dev.knotless.pull`

**Type**: `record`

For a private repository, written in the requester's repo inside the repository's space.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `attachments` | `array` | No | What it carries beside its body: the pictures the body shows. Kinds unknown to a reader are passed over, and kept by a client changing it. |
| `base` | `string` | Yes | The branch to merge into, without refs/heads/. |
| `body` | `string` | No | Markdown. |
| `createdAt` | `string` (datetime) | Yes |  |
| `draft` | `boolean` | No | Whether it is a draft: not ready to merge or queue. Its author clears it when it is ready. Not a draft, when absent. |
| `facets` | `array` | No | The accounts its body mentions, by where: written as it is, from each `@handle` outside code and links. |
| `head` | `ref` → `#head` | Yes |  |
| `repo` | `ref` → `dev.knotless.defs#repoRef` | Yes | The target repository. |
| `reviewers` | `array` | No | The accounts its author asks to review it. A maintainer asking someone else would need a record of their own, which this is not. |
| `title` | `string` | Yes |  |
| `titleFacets` | `array` | No | The accounts its title mentions, by where. |
| `updatedAt` | `string` (datetime) | No | When its author last changed its title or body. |

### `dev.knotless.pull#reviewer`

**Type**: `object`

An account a pull's author asks to review it.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | The account asked. |
| `requestedAt` | `string` (datetime) | No | When it was asked: when named, or when the pull was last marked ready, if that was later. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "head": {
      "description": "Where the changes to merge are.",
      "properties": {
        "branch": {
          "description": "Without refs/heads/.",
          "maxLength": 255,
          "type": "string"
        },
        "repo": {
          "description": "The repository holding the branch: the target, or a fork.",
          "ref": "dev.knotless.defs#repoRef",
          "type": "ref"
        }
      },
      "required": [
        "repo",
        "branch"
      ],
      "type": "object"
    },
    "main": {
      "description": "For a private repository, written in the requester's repo inside the repository's space.",
      "key": "tid",
      "record": {
        "properties": {
          "attachments": {
            "description": "What it carries beside its body: the pictures the body shows. Kinds unknown to a reader are passed over, and kept by a client changing it.",
            "items": {
              "refs": [
                "dev.knotless.defs#image"
              ],
              "type": "union"
            },
            "maxLength": 32,
            "type": "array"
          },
          "base": {
            "description": "The branch to merge into, without refs/heads/.",
            "maxLength": 255,
            "type": "string"
          },
          "body": {
            "description": "Markdown.",
            "maxLength": 20000,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "draft": {
            "description": "Whether it is a draft: not ready to merge or queue. Its author clears it when it is ready. Not a draft, when absent.",
            "type": "boolean"
          },
          "facets": {
            "description": "The accounts its body mentions, by where: written as it is, from each `@handle` outside code and links.",
            "items": {
              "ref": "dev.knotless.defs#facet",
              "type": "ref"
            },
            "maxLength": 50,
            "type": "array"
          },
          "head": {
            "ref": "#head",
            "type": "ref"
          },
          "repo": {
            "description": "The target repository.",
            "ref": "dev.knotless.defs#repoRef",
            "type": "ref"
          },
          "reviewers": {
            "description": "The accounts its author asks to review it. A maintainer asking someone else would need a record of their own, which this is not.",
            "items": {
              "ref": "#reviewer",
              "type": "ref"
            },
            "maxLength": 32,
            "type": "array"
          },
          "title": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "titleFacets": {
            "description": "The accounts its title mentions, by where.",
            "items": {
              "ref": "dev.knotless.defs#facet",
              "type": "ref"
            },
            "maxLength": 50,
            "type": "array"
          },
          "updatedAt": {
            "description": "When its author last changed its title or body.",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "repo",
          "base",
          "head",
          "title",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "reviewer": {
      "description": "An account a pull's author asks to review it.",
      "properties": {
        "did": {
          "description": "The account asked.",
          "format": "did",
          "type": "string"
        },
        "requestedAt": {
          "description": "When it was asked: when named, or when the pull was last marked ready, if that was later.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    }
  },
  "description": "A request to merge a branch into a repository, kept in the requester's account.",
  "id": "dev.knotless.pull",
  "lexicon": 1
}
```
