# dev.knotless.pull

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

- Kind: record
- Record key: tid
- Authority: knotless.dev
- Lexicon: 1
- Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.pull)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.pull/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.pull/analytics)

## Record (`dev.knotless.pull`)

Type: record · key tid

### Properties

- `attachments` (array): 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.
  - Constraints: maxLength: 32
  - `items` (union)
    - One of: `dev.knotless.defs#image`
- `base` (string, required): The branch to merge into, without refs/heads/.
  - Constraints: maxLength: 255
- `body` (string): Markdown.
  - Constraints: maxLength: 20000
- `createdAt` (string · datetime, required)
- `draft` (boolean): 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): The accounts its body mentions, by where: written as it is, from each `@handle` outside code and links.
  - Constraints: maxLength: 50
  - `items` (ref)
    - Reference: `dev.knotless.defs#facet`
- `head` (ref, required)
  - Reference: `#head`
- `repo` (ref, required): The target repository.
  - Reference: `dev.knotless.defs#repoRef`
- `reverts` (string · at-uri): For a revert, the merged dev.knotless.pull it undoes, on the same repository, as `knotless pull revert` opens it. Readers count it only once this pull is merged.
- `reviewers` (array): The accounts its author asks to review it. A maintainer asking someone else would need a record of their own, which this is not.
  - Constraints: maxLength: 32
  - `items` (ref)
    - Reference: `#reviewer`
- `title` (string, required)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `titleFacets` (array): The accounts its title mentions, by where.
  - Constraints: maxLength: 50
  - `items` (ref)
    - Reference: `dev.knotless.defs#facet`
- `updatedAt` (string · datetime): When its author last changed its title or body.

## #head (`dev.knotless.pull#head`)

Type: object

Where the changes to merge are.

### Properties

- `branch` (string, required): Without refs/heads/.
  - Constraints: maxLength: 255
- `repo` (ref, required): The repository holding the branch: the target, or a fork.
  - Reference: `dev.knotless.defs#repoRef`

## #reviewer (`dev.knotless.pull#reviewer`)

Type: object

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

### Properties

- `did` (string · did, required): The account asked.
- `requestedAt` (string · datetime): When it was asked: when named, or when the pull was last marked ready, if that was later.

## 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"
          },
          "reverts": {
            "description": "For a revert, the merged dev.knotless.pull it undoes, on the same repository, as `knotless pull revert` opens it. Readers count it only once this pull is merged.",
            "format": "at-uri",
            "type": "string"
          },
          "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
}
```
