# dev.knotless.getTemplate

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

✓ This is the authoritative definition for this NSID.

## Description

What a repository asks a new pull's or issue's body to follow.

## Links

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

## Definitions

### `dev.knotless.getTemplate`

**Type**: `query`

The template a repository asks its pulls or issues to be written from, as `knotless template` reads it: `.knotless/pull.md` or `.knotless/issue.md`, at a pull's base branch or else the default branch. Opening one whose body has none of the template's sections is refused. No authentication; responses are not personalized.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `base` | `string` | No | For a pull, the branch it is to merge into: the template there. |
| `kind` | `string` | Yes | What is to be opened. |
| `repo` | `string` (at-uri) | Yes | The repository's dev.knotless.repo record. Its authority may be a handle. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `template` | `string` | No | The template, in Markdown; absent when the repository has none. |

#### Errors

- **NotFound**: No such repository.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The template a repository asks its pulls or issues to be written from, as `knotless template` reads it: `.knotless/pull.md` or `.knotless/issue.md`, at a pull's base branch or else the default branch. Opening one whose body has none of the template's sections is refused. No authentication; responses are not personalized.",
      "errors": [
        {
          "description": "No such repository.",
          "name": "NotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "template": {
              "description": "The template, in Markdown; absent when the repository has none.",
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "base": {
            "description": "For a pull, the branch it is to merge into: the template there.",
            "maxLength": 1024,
            "type": "string"
          },
          "kind": {
            "description": "What is to be opened.",
            "knownValues": [
              "pull",
              "issue"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "repo": {
            "description": "The repository's dev.knotless.repo record. Its authority may be a handle.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "repo",
          "kind"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "What a repository asks a new pull's or issue's body to follow.",
  "id": "dev.knotless.getTemplate",
  "lexicon": 1
}
```
