# dev.knotless.assignment

> Kept in the account of the owner or collaborator who assigns, one per pull or issue, keyed `<repo key>.<hash of the subject's URI>` as a dev.knotless.label record is, and rewritten as they change; for a private repository, in their repo inside its space. Readers honor it from the repository's owner and collaborators alone. Each account stands assigned, or asked to review, as the latest of their entries for it says, by `setAt`. A pull's author asks for reviews in the pull itself (dev.knotless.pull's `reviewers`); those asked here are asked besides.

- Kind: record
- Record key: any
- 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.assignment)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.assignment/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.assignment/analytics)

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

Type: record · key any

### Properties

- `assignees` (array): One entry per account this one has assigned it to or taken off it, the latest of each.
  - Constraints: maxLength: 100
  - `items` (ref)
    - Reference: `#entry`
- `createdAt` (string · datetime, required)
- `repo` (ref, required): The repository the pull or issue is on.
  - Reference: `dev.knotless.defs#repoRef`
- `reviewers` (array): For a pull, one entry per account this one has asked to review it or stopped asking, the latest of each.
  - Constraints: maxLength: 100
  - `items` (ref)
    - Reference: `#entry`
- `subject` (string · at-uri, required): The dev.knotless.pull or dev.knotless.issue assigned.

## #entry (`dev.knotless.assignment#entry`)

Type: object

An account assigned, or asked to review, or no longer, at a time.

### Properties

- `did` (string · did, required): The account, by DID.
- `removed` (boolean): No longer assigned, or asked, rather than so.
- `setAt` (string · datetime, required): When it was said. Readers pass over one later than their own clock by more than a few minutes, until it is not.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "entry": {
      "description": "An account assigned, or asked to review, or no longer, at a time.",
      "properties": {
        "did": {
          "description": "The account, by DID.",
          "format": "did",
          "type": "string"
        },
        "removed": {
          "description": "No longer assigned, or asked, rather than so.",
          "type": "boolean"
        },
        "setAt": {
          "description": "When it was said. Readers pass over one later than their own clock by more than a few minutes, until it is not.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "did",
        "setAt"
      ],
      "type": "object"
    },
    "main": {
      "description": "Kept in the account of the owner or collaborator who assigns, one per pull or issue, keyed `<repo key>.<hash of the subject's URI>` as a dev.knotless.label record is, and rewritten as they change; for a private repository, in their repo inside its space. Readers honor it from the repository's owner and collaborators alone. Each account stands assigned, or asked to review, as the latest of their entries for it says, by `setAt`. A pull's author asks for reviews in the pull itself (dev.knotless.pull's `reviewers`); those asked here are asked besides.",
      "key": "any",
      "record": {
        "properties": {
          "assignees": {
            "description": "One entry per account this one has assigned it to or taken off it, the latest of each.",
            "items": {
              "ref": "#entry",
              "type": "ref"
            },
            "maxLength": 100,
            "type": "array"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "repo": {
            "description": "The repository the pull or issue is on.",
            "ref": "dev.knotless.defs#repoRef",
            "type": "ref"
          },
          "reviewers": {
            "description": "For a pull, one entry per account this one has asked to review it or stopped asking, the latest of each.",
            "items": {
              "ref": "#entry",
              "type": "ref"
            },
            "maxLength": 100,
            "type": "array"
          },
          "subject": {
            "description": "The dev.knotless.pull or dev.knotless.issue assigned.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "repo",
          "subject",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "Whom one of a repository's maintainers assigns a pull or an issue to, and asks to review a pull.",
  "id": "dev.knotless.assignment",
  "lexicon": 1
}
```
