# dev.knotless.autoMerge

> Kept in the account of whoever wrote it; for a private repository, in their repo inside the repository's space. Readers honour `set` only from the repository's owner or a collaborator, and `cancelled` from them or the pull's author. For each pull, the latest honoured record wins, by record key. A runner the repository names merges a pull set so once its checks pass at its head merged with its base.

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

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

Type: record · key tid

### Properties

- `base` (string): For `set`, the branch the pull targeted as it was set. Retargeted since, it is cancelled.
  - Constraints: maxLength: 256
- `commit` (string): For `set`, the hex object ID of the pull's head as it was set. A later head counts only when the pull's head repository belongs to someone who may merge it: a push by anyone else cancels it.
  - Constraints: minLength: 40, maxLength: 64
- `createdAt` (string · datetime, required)
- `repo` (ref, required): The repository the pull is on.
  - Reference: `dev.knotless.defs#repoRef`
- `state` (string, required): `set` has it merge once its checks pass; `cancelled` takes that back.
  - Constraints: maxLength: 64, knownValues: set | cancelled
- `subject` (string · at-uri, required): The dev.knotless.pull set to merge, or no longer.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Kept in the account of whoever wrote it; for a private repository, in their repo inside the repository's space. Readers honour `set` only from the repository's owner or a collaborator, and `cancelled` from them or the pull's author. For each pull, the latest honoured record wins, by record key. A runner the repository names merges a pull set so once its checks pass at its head merged with its base.",
      "key": "tid",
      "record": {
        "properties": {
          "base": {
            "description": "For `set`, the branch the pull targeted as it was set. Retargeted since, it is cancelled.",
            "maxLength": 256,
            "type": "string"
          },
          "commit": {
            "description": "For `set`, the hex object ID of the pull's head as it was set. A later head counts only when the pull's head repository belongs to someone who may merge it: a push by anyone else cancels it.",
            "maxLength": 64,
            "minLength": 40,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "repo": {
            "description": "The repository the pull is on.",
            "ref": "dev.knotless.defs#repoRef",
            "type": "ref"
          },
          "state": {
            "description": "`set` has it merge once its checks pass; `cancelled` takes that back.",
            "knownValues": [
              "set",
              "cancelled"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "subject": {
            "description": "The dev.knotless.pull set to merge, or no longer.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "repo",
          "subject",
          "state",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "A pull set to merge by itself once its checks pass, or that setting cancelled.",
  "id": "dev.knotless.autoMerge",
  "lexicon": 1
}
```
