~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

7
103 lines · 7.2 KB Raw History
{
  "lexicon": 1,
  "id": "dev.knotless.getThread",
  "description": "A pull or an issue, and everything said on it.",
  "defs": {
    "main": {
      "type": "query",
      "description": "A pull or an issue on a repository: what it says, what was said on it, and for a pull what it brings in, how its checks stand and where it is in the merge queue. No authentication; asked as an account, with a service token or the pages' session cookie, the answer says what that account may do with it, and which reactions are its own. A private repository is read for its members asking so.",
      "parameters": {
        "type": "params",
        "required": ["repo", "uri"],
        "properties": {
          "repo": { "type": "string", "format": "at-uri", "description": "The repository's dev.knotless.repo record. Its authority may be a handle; a name the repository had before, or an owner it moved from with its agreement, finds it under the name it has now." },
          "uri": { "type": "string", "format": "at-uri", "description": "The dev.knotless.pull or dev.knotless.issue record." },
          "filesOnly": { "type": "boolean", "default": false, "description": "A pull's changed files without their rows: what each is, how many lines it adds and removes, and a note where its rows would not be shown. dev.knotless.getPullDiff gives the rows of the files a reader comes to." },
          "firstRows": { "type": "boolean", "default": false, "description": "With filesOnly, the rows of the first files too, as a page draws them at once: from the first, those whose rows would be shown, up to 10 files and 1500 changed lines, passing over any that changes more than 400. The rest come without, for dev.knotless.getPullDiff." }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["item", "comments", "closes", "checks", "card"],
          "properties": {
            "item": { "type": "ref", "ref": "dev.knotless.defs#itemView" },
            "body": { "type": "string", "description": "What it says, as its author wrote it, in Markdown." },
            "html": { "type": "string", "description": "Its body, made into HTML as a comment's is." },
            "base": { "type": "string", "description": "A pull's target branch." },
            "head": { "type": "ref", "ref": "dev.knotless.defs#pullHeadView", "description": "What a pull brings in." },
            "merged": { "type": "string", "description": "For a merged pull, the commit it merged as." },
            "comments": {
              "type": "array",
              "description": "Oldest first.",
              "items": { "type": "ref", "ref": "dev.knotless.defs#commentView" }
            },
            "reviews": {
              "type": "array",
              "description": "For a pull, where each reviewer stands, in the order they last reviewed. Absent when no one has.",
              "items": { "type": "ref", "ref": "dev.knotless.defs#reviewView" }
            },
            "closes": {
              "type": "array",
              "description": "The issues on the repository a pull's title or body names to close as it merges into the default branch.",
              "items": { "type": "ref", "ref": "dev.knotless.defs#itemView" }
            },
            "closedBy": { "type": "ref", "ref": "dev.knotless.defs#itemViewBasic", "description": "For a closed issue, the pull whose merge closed it." },
            "mentionedBy": {
              "type": "array",
              "description": "For an issue, the pulls on the repository whose title or body names it, oldest first, whatever their state. Absent when none does.",
              "items": { "type": "ref", "ref": "#mention" }
            },
            "revertedBy": { "type": "ref", "ref": "dev.knotless.defs#itemViewBasic", "description": "For a merged pull, the revert whose merge undid it: a pull naming it in its `reverts`, merged too. The newest, if it was undone more than once." },
            "queue": { "type": "ref", "ref": "dev.knotless.defs#queueStateView", "description": "Where an open pull stands in its branch's merge queue, if it was queued or ejected from it." },
            "checks": {
              "type": "array",
              "description": "For a pull, the newest run of each workflow at its head: by the target's runners for the pull, and by those of the repository it comes from for its branch. For a pull the merge queue landed, the runs it landed on: those on its base at its batch's tip.",
              "items": { "type": "ref", "ref": "dev.knotless.defs#checkView" }
            },
            "minutes": {
              "type": "array",
              "description": "For a pull, the minutes each runner of the target counts for the target's owner, where it has counted any; none for a private repository.",
              "items": { "type": "ref", "ref": "dev.knotless.defs#minutesView" }
            },
            "changes": { "type": "ref", "ref": "dev.knotless.defs#changesView", "description": "What a pull brings in; absent for an issue, or a pull whose branch is gone." },
            "card": { "type": "string", "description": "The path of the picture its page unfurls into." },
            "reactions": {
              "type": "array",
              "description": "How accounts reacted to the pull or issue itself, by content, as dev.knotless.getReactions counts them. Absent when none did.",
              "items": { "type": "ref", "ref": "dev.knotless.defs#reactionCountView" }
            },
            "viewer": { "type": "ref", "ref": "#viewerState", "description": "What the account asking may do with it; absent when no one asks." }
          }
        }
      },
      "errors": [
        { "name": "NotFound", "description": "No such repository or record on it; or this appview keeps no index, so it knows no pulls or issues." }
      ]
    },
    "mention": {
      "type": "object",
      "description": "A pull that names an issue.",
      "required": ["item"],
      "properties": {
        "item": { "type": "ref", "ref": "dev.knotless.defs#itemView", "description": "The pull." },
        "closes": { "type": "boolean", "description": "Whether it names the issue after a closing keyword, so that merging it into the default branch closes it. Not, when absent." }
      }
    },
    "viewerState": {
      "type": "object",
      "description": "What the account asking may do with a pull or an issue, past commenting on it, editing what it wrote and reporting, which anyone may.",
      "properties": {
        "setState": { "type": "boolean", "description": "Whether it may close or reopen it: as who opened it, or the repository's owner or a collaborator." },
        "hide": { "type": "boolean", "description": "Whether it may hide it, or what is said on it: as the repository's owner." },
        "revert": { "type": "boolean", "description": "Whether it may revert a merged pull with dev.knotless.revertPull: as the repository's owner or a collaborator." },
        "labels": {
          "type": "array",
          "description": "The labels the repository defines that it may put on or take off, in the order the repository defines them.",
          "items": { "type": "ref", "ref": "dev.knotless.repo#label" }
        }
      }
    }
  }
}