# org.tangled.event.pullRequest

> When pull request is created or resubmitted.

- Kind: object
- Authority: event.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.event.pullRequest)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.event.pullRequest/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:wshs7t2adsemcrrd4snkeqli/org.tangled.event.pullRequest/analytics)

## Object (`org.tangled.event.pullRequest`)

Type: object

### Properties

- `action` (string): The pull request lifecycle action that produced this trigger.
  - Constraints: enum: opened | reopened | closed | merged | synchronize
- `pull` (string · at-uri): AT-URI of the pull request record this run belongs to.
- `sourceBranch` (string)
- `sourceRepo` (string · did): Repository DID to check out code and workflow definitions from, if different from the target repo.
- `sourceSha` (string): Commit id of the pull request head.
  - Constraints: minLength: 40, maxLength: 64
- `targetBranch` (string)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "When pull request is created or resubmitted.",
      "properties": {
        "action": {
          "description": "The pull request lifecycle action that produced this trigger.",
          "enum": [
            "opened",
            "reopened",
            "closed",
            "merged",
            "synchronize"
          ],
          "type": "string"
        },
        "pull": {
          "description": "AT-URI of the pull request record this run belongs to.",
          "format": "at-uri",
          "type": "string"
        },
        "sourceBranch": {
          "type": "string"
        },
        "sourceRepo": {
          "description": "Repository DID to check out code and workflow definitions from, if different from the target repo.",
          "format": "did",
          "type": "string"
        },
        "sourceSha": {
          "description": "Commit id of the pull request head.",
          "maxLength": 64,
          "minLength": 40,
          "type": "string"
        },
        "targetBranch": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "id": "org.tangled.event.pullRequest",
  "lexicon": 1,
  "needsCbor": true,
  "needsType": true
}
```
