# dev.knotless.createOrgRepo

> Makes the repository as `knotless repo create` does: public unless asked for private, naming the runners given or those the gateway's appview offers, with no branches until the first push.

- Kind: procedure
- Authority: knotless.dev
- Lexicon: 1
- Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.createOrgRepo)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.createOrgRepo/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.createOrgRepo/analytics)

## Procedure (`dev.knotless.createOrgRepo`)

Type: procedure · POST

### Input (application/json)

- `defaultBranch` (string): The branch its HEAD names, without refs/heads/: main when absent.
  - Constraints: maxLength: 255
- `description` (string): What the repository is, shown under its name.
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `name` (string, required): The repository's name, its record key.
  - Constraints: maxLength: 100
- `org` (string · did, required): The organization.
- `private` (boolean): Whether to make it private: a space of its own on the organization's PDS, which only its members read. Public when absent.
- `runners` (array): The accounts that run its workflows: those the gateway's appview offers when absent.
  - Constraints: maxLength: 20
  - `items` (ref)
    - Reference: `#account`

### Output (application/json)

- `members` (array, required): The members of the organization who may push to it: on a public one, those anyone may see.
  - `items` (ref)
    - Reference: `#account`
- `runners` (array, required): Its runners: a private one's can read it.
  - `items` (ref)
    - Reference: `#account`
- `uninvited` (string): Why a private one's runners were not told of it, when they were not.
  - Constraints: maxLength: 3000

## #account (`dev.knotless.createOrgRepo#account`)

Type: object

An account, by DID.

### Properties

- `did` (string · did, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "account": {
      "description": "An account, by DID.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    },
    "main": {
      "description": "Makes the repository as `knotless repo create` does: public unless asked for private, naming the runners given or those the gateway's appview offers, with no branches until the first push.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "defaultBranch": {
              "description": "The branch its HEAD names, without refs/heads/: main when absent.",
              "maxLength": 255,
              "type": "string"
            },
            "description": {
              "description": "What the repository is, shown under its name.",
              "maxGraphemes": 300,
              "maxLength": 3000,
              "type": "string"
            },
            "name": {
              "description": "The repository's name, its record key.",
              "maxLength": 100,
              "type": "string"
            },
            "org": {
              "description": "The organization.",
              "format": "did",
              "type": "string"
            },
            "private": {
              "description": "Whether to make it private: a space of its own on the organization's PDS, which only its members read. Public when absent.",
              "type": "boolean"
            },
            "runners": {
              "description": "The accounts that run its workflows: those the gateway's appview offers when absent.",
              "items": {
                "ref": "#account",
                "type": "ref"
              },
              "maxLength": 20,
              "type": "array"
            }
          },
          "required": [
            "org",
            "name"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "members": {
              "description": "The members of the organization who may push to it: on a public one, those anyone may see.",
              "items": {
                "ref": "#account",
                "type": "ref"
              },
              "type": "array"
            },
            "runners": {
              "description": "Its runners: a private one's can read it.",
              "items": {
                "ref": "#account",
                "type": "ref"
              },
              "type": "array"
            },
            "uninvited": {
              "description": "Why a private one's runners were not told of it, when they were not.",
              "maxLength": 3000,
              "type": "string"
            }
          },
          "required": [
            "runners",
            "members"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Creates a repository in an organization's account, through the gateway the organization delegated writes to, which makes it as the organization, as `knotless repo create` does. The caller must be an admin of it who joined. Requires a service token from the caller's PDS, audience the gateway's DID, for this method.",
  "id": "dev.knotless.createOrgRepo",
  "lexicon": 1
}
```
