tanuki v0.2.0 Tanuki.Projects.Repository.Branches

Summary

Functions

POST /projects/:id/repository/branches

DELETE /projects/:id/repository/branches/:branch

GET /projects/:id/repository/branches/:branch

GET /projects/:id/repository/branches

PUT /projects/:id/repository/branches/:branch/protect

PUT /projects/:id/repository/branches/:branch/unprotect

Functions

create(id, client, params)

POST /projects/:id/repository/branches

Parameters:

  • branch_name (required) - The name of the branch
  • ref (required) - The branch name or commit SHA to create branch from
delete(id, branch, client)

DELETE /projects/:id/repository/branches/:branch

It returns 200 if it succeeds, 404 if the branch to be deleted does not exist or 400 for other reasons. In case of an error, an explaining message is provided.

find(id, branch_name, client)

GET /projects/:id/repository/branches/:branch

Lists a specific branch of a project.

list(id, client)

GET /projects/:id/repository/branches

Lists all branches of a project.

protect(id, branch_name, client)

PUT /projects/:id/repository/branches/:branch/protect

Protects a single branch of a project.

unprotect(id, branch_name, client)

PUT /projects/:id/repository/branches/:branch/unprotect

Unprotects a single branch of a project.