{
  "lexicon": 1,
  "id": "sh.tangled.repo.pull",
  "needsCbor": true,
  "needsType": true,
  "defs": {
    "main": {
      "type": "record",
      "key": "tid",
      "record": {
        "type": "object",
        "required": [
          "target",
          "title",
          "createdAt",
          "rounds"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "body": {
            "type": "string"
          },
          "rounds": {
            "type": "array",
            "items": {
              "type": "ref",
              "ref": "#round"
            }
          },
          "source": {
            "type": "ref",
            "ref": "#source"
          },
          "target": {
            "type": "ref",
            "ref": "#target"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "mentions": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "did"
            }
          },
          "references": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "at-uri"
            }
          },
          "dependentOn": {
            "type": "string",
            "format": "at-uri"
          }
        }
      }
    },
    "target": {
      "type": "object",
      "required": [
        "repo",
        "branch"
      ],
      "properties": {
        "repo": {
          "type": "string",
          "format": "did"
        },
        "branch": {
          "type": "string"
        }
      }
    },
    "source": {
      "type": "object",
      "required": [
        "branch"
      ],
      "properties": {
        "branch": {
          "type": "string"
        },
        "repo": {
          "type": "string",
          "format": "did"
        }
      }
    },
    "round": {
      "type": "object",
      "required": [
        "patchBlob",
        "createdAt"
      ],
      "description": "revisions of this pull request, newer rounds are appended to this array. appviews may reject records do not treat this field as append-only. the blob format is gzipped text-based git-format-patches.",
      "properties": {
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "patchBlob": {
          "type": "blob",
          "accept": [
            "application/gzip"
          ]
        }
      }
    }
  }
}
