Update a Tugboat Repository

Updates the properties of a Tugboat Repository, or a set of Tugboat Repositories

Arguments

  • repo - Required
    The ID of the repository to udpate.

  • name - Optional
    A human-readable name to associate with the repository.

  • project - Optional
    The ID of a project that should be the repository's parent. A value of 0 means there should be no parent project. The API key used to make the request must be a Tugboat Admin in order to set this value to 0. The requestor must also be an admin of both the current projet as well as the new project in order to change this value.

  • provider - Optional
    Which provider to use for this repository. Valid options are bitbucket, git, github, gitlab, or stash.

  • users - Optional
    A list of API Key IDs that should have user-level access to the repository. This can be a single ID, or an array of IDs.
  • admins - Optional
    A list of API Key IDs that should have admin-level access to the repository. This can be a single ID, an array of IDs.
  • quota - Optional
    A disk quota in GB to impose on the repository. A quota of 0 means that there is no quota. If this quota is larger than the quota set on the repository's parent project, the project's quota takes priority. Likewise, if the sum of the quotas of all of the repositories in a project is larger than the project's quota, the project's quota is enforced.
  • agent - Optional
    Which Tugboat Agent to assign the repository to.
  • ssh_private - Optional
    The private half of an SSH key pair to use for previews created in this repository.

Example

socket.emit('tugboat', 'repos', 'update', args, callback);

Output

single

{
    "updatedAt": "2017-02-17T20:33:38.452Z",
    "createdAt": "2017-02-17T20:33:38.452Z",
    "name": "my-github-project",
    "agent": "dev.tugboat.qa",
    "_id": "58a75e22ddccc30001a26086",
    "size": 0,
    "quota": 0,
    "admins": [],
    "users": [],
    "project": "58a758b534f0210001cf9439",
    "id": "58a75e22ddccc30001a26086"
}

array

[
    {
        "updatedAt": "2017-02-17T20:33:38.452Z",
        "createdAt": "2017-02-17T20:33:38.452Z",
        "name": "my-github-project",
        "agent": "dev.tugboat.qa",
        "_id": "58a75e22ddccc30001a26086",
        "size": 0,
        "quota": 0,
        "admins": [],
        "users": [],
        "project": "58a758b534f0210001cf9439",
        "id": "58a75e22ddccc30001a26086"
    }
]

Errors

  • 1005: No Repositories Found
    Returned if the requested repositories do not exist, or the requestor does not have permission to update them.

  • 1006: No Repository ID Provided
    The required repo argument was not included in the request.

results matching ""

    No results matching ""