# dev.knotless.listCommits

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

A repository's history.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.listCommits)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.listCommits/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.listCommits/examples)

## Definitions

### `dev.knotless.listCommits`

**Type**: `query`

The commits reachable from a revision that changed a path, newest first, a page at a time: follow `cursor` until it is absent. A repository never pushed has none at its default branch. No authentication needed; asked as an account, with a service token or the pages' session cookie, a private repository it is a member of is read too, and the answer is that account's alone.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No | How many commits the pages before held. |
| `limit` | `integer` | No |  |
| `path` | `string` | No | A path in the tree, from its root. |
| `ref` | `string` | No | A branch, a tag or a commit; the default branch if absent. It may run on into the path, as a web address names them: the longest branch or tag that starts it is the ref, and what follows goes before `path`. |
| `repo` | `string` (at-uri) | Yes | 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. |
| `subjectOnly` | `boolean` | No | Each commit's message cut to its first line, its subject, as a list of commits shows it: far less to send when squashed pulls carry their bodies. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `checks` | `array` | No | The newest run of each workflow at each of `commits`, by the runners the repository names; each says its commit. |
| `commits` | `array` | Yes |  |
| `cursor` | `string` | No | Absent on the last page. |
| `path` | `string` | Yes | The path, from the root; empty for the whole tree. |
| `ref` | `string` | Yes | The ref or commit shown, as `ref` named it, less any path. |

#### Errors

- **NotFound**: No such repository, revision, path or record.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The commits reachable from a revision that changed a path, newest first, a page at a time: follow `cursor` until it is absent. A repository never pushed has none at its default branch. No authentication needed; asked as an account, with a service token or the pages' session cookie, a private repository it is a member of is read too, and the answer is that account's alone.",
      "errors": [
        {
          "description": "No such repository, revision, path or record.",
          "name": "NotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "checks": {
              "description": "The newest run of each workflow at each of `commits`, by the runners the repository names; each says its commit.",
              "items": {
                "ref": "dev.knotless.defs#checkView",
                "type": "ref"
              },
              "type": "array"
            },
            "commits": {
              "items": {
                "ref": "dev.knotless.defs#commitView",
                "type": "ref"
              },
              "type": "array"
            },
            "cursor": {
              "description": "Absent on the last page.",
              "type": "string"
            },
            "path": {
              "description": "The path, from the root; empty for the whole tree.",
              "type": "string"
            },
            "ref": {
              "description": "The ref or commit shown, as `ref` named it, less any path.",
              "type": "string"
            }
          },
          "required": [
            "ref",
            "path",
            "commits"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "description": "How many commits the pages before held.",
            "maxLength": 32,
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "path": {
            "description": "A path in the tree, from its root.",
            "maxLength": 4096,
            "type": "string"
          },
          "ref": {
            "description": "A branch, a tag or a commit; the default branch if absent. It may run on into the path, as a web address names them: the longest branch or tag that starts it is the ref, and what follows goes before `path`.",
            "maxLength": 1024,
            "type": "string"
          },
          "repo": {
            "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.",
            "format": "at-uri",
            "type": "string"
          },
          "subjectOnly": {
            "default": false,
            "description": "Each commit's message cut to its first line, its subject, as a list of commits shows it: far less to send when squashed pulls carry their bodies.",
            "type": "boolean"
          }
        },
        "required": [
          "repo"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "A repository's history.",
  "id": "dev.knotless.listCommits",
  "lexicon": 1
}
```
