# dev.knotless.rerun

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

✓ This is the authoritative definition for this NSID.

## Description

A repository owner's request that its runners run a ref's or a pull's workflows again.

## Links

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

## Definitions

### `dev.knotless.rerun`

**Type**: `record`

Kept in the account of the repository's owner, keyed `<repo key>.<tid>`. A runner acts on the requests in the owner's account, newer than the last it acted on, and on no one else's; it runs the ref or the pull's head where it points when the runner reads it. Naming neither a ref nor a pull asks for nothing. With a ref and a workflow, it runs only that workflow there, its steps seeing env: one that runs on a push to the ref, or one whose trigger is to be asked for. With a pull and a workflow, it runs only that one of the pull's workflows, where the pull is.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `createdAt` | `string` (datetime) | Yes |  |
| `env` | `array` | No | With workflow, variables its steps see, over the workflow's own of the same names. |
| `pull` | `string` (at-uri) | No | The dev.knotless.pull record whose head to run again. |
| `ref` | `string` | No | The full ref name to run again, such as refs/heads/main. |
| `repo` | `ref` → `dev.knotless.defs#repoRef` | Yes | The repository, which is the owner's. |
| `workflow` | `string` | No | The name of the one workflow to run at the ref, or of the pull's. |

### `dev.knotless.rerun#var`

**Type**: `object`

A variable a requested run's steps see.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | A shell variable's name, not the runner's own, which begin KNOTLESS_RUN. |
| `value` | `string` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Kept in the account of the repository's owner, keyed `<repo key>.<tid>`. A runner acts on the requests in the owner's account, newer than the last it acted on, and on no one else's; it runs the ref or the pull's head where it points when the runner reads it. Naming neither a ref nor a pull asks for nothing. With a ref and a workflow, it runs only that workflow there, its steps seeing env: one that runs on a push to the ref, or one whose trigger is to be asked for. With a pull and a workflow, it runs only that one of the pull's workflows, where the pull is.",
      "key": "any",
      "record": {
        "properties": {
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "env": {
            "description": "With workflow, variables its steps see, over the workflow's own of the same names.",
            "items": {
              "ref": "#var",
              "type": "ref"
            },
            "maxLength": 32,
            "type": "array"
          },
          "pull": {
            "description": "The dev.knotless.pull record whose head to run again.",
            "format": "at-uri",
            "type": "string"
          },
          "ref": {
            "description": "The full ref name to run again, such as refs/heads/main.",
            "maxLength": 1024,
            "type": "string"
          },
          "repo": {
            "description": "The repository, which is the owner's.",
            "ref": "dev.knotless.defs#repoRef",
            "type": "ref"
          },
          "workflow": {
            "description": "The name of the one workflow to run at the ref, or of the pull's.",
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "repo",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "var": {
      "description": "A variable a requested run's steps see.",
      "properties": {
        "name": {
          "description": "A shell variable's name, not the runner's own, which begin KNOTLESS_RUN.",
          "maxLength": 64,
          "type": "string"
        },
        "value": {
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "name",
        "value"
      ],
      "type": "object"
    }
  },
  "description": "A repository owner's request that its runners run a ref's or a pull's workflows again.",
  "id": "dev.knotless.rerun",
  "lexicon": 1
}
```
