# org.tangled.ci.triggerPipeline

> Trigger a pipeline at an explicit commit. Runs the named workflows, or every workflow defined in the repo when none are named.

- Kind: procedure
- Authority: ci.tangled.org
- Lexicon: 1
- Published by [tangled.org](https://lexicon.garden/identity/did:plc:wshs7t2adsemcrrd4snkeqli), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.ci.triggerPipeline)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.ci.triggerPipeline/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.ci.triggerPipeline/analytics)

## Procedure (`org.tangled.ci.triggerPipeline`)

Type: procedure · POST

### Input (application/json)

- `repo` (string · did, required): Target repository DID. Auth is checked against this repo.
- `trigger` (union, required): Trigger metadata for this dispatch.
  - One of: `org.tangled.ci.trigger.manual`, `org.tangled.event.pullRequest`
- `workflows` (array): Workflow names to run. When not provided, every dispatchable workflow is run.
  - `items` (string): workflow name

### Output (application/json)

- `pipeline` (string, required): Spindle-local id of the created pipeline

### Errors

- `InvalidRequest`: Invalid request parameters

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Trigger a pipeline at an explicit commit. Runs the named workflows, or every workflow defined in the repo when none are named.",
      "errors": [
        {
          "description": "Invalid request parameters",
          "name": "InvalidRequest"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "repo": {
              "description": "Target repository DID. Auth is checked against this repo.",
              "format": "did",
              "type": "string"
            },
            "trigger": {
              "closed": false,
              "description": "Trigger metadata for this dispatch.",
              "refs": [
                "org.tangled.ci.trigger.manual",
                "org.tangled.event.pullRequest"
              ],
              "type": "union"
            },
            "workflows": {
              "description": "Workflow names to run. When not provided, every dispatchable workflow is run.",
              "items": {
                "description": "workflow name",
                "type": "string"
              },
              "type": "array"
            }
          },
          "required": [
            "repo",
            "trigger"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "pipeline": {
              "description": "Spindle-local id of the created pipeline",
              "type": "string"
            }
          },
          "required": [
            "pipeline"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "org.tangled.ci.triggerPipeline",
  "lexicon": 1
}
```
