Package google.devtools.sourcerepo.v1

Index

SourceRepo

The Source Repo API service.

CreateRepo

rpc CreateRepo(CreateRepoRequest) returns (Repo)

Creates a repo in the given project with the given name.

If the named repository already exists, CreateRepo returns ALREADY_EXISTS.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/source.read_only
  • https://www.googleapis.com/auth/source.read_write
  • https://www.googleapis.com/auth/source.full_control
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

DeleteRepo

rpc DeleteRepo(DeleteRepoRequest) returns (Empty)

Deletes a repo.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/source.read_only
  • https://www.googleapis.com/auth/source.read_write
  • https://www.googleapis.com/auth/source.full_control
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

GetIamPolicy

rpc GetIamPolicy(GetIamPolicyRequest) returns (Policy)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/source.read_only
  • https://www.googleapis.com/auth/source.read_write
  • https://www.googleapis.com/auth/source.full_control
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

GetRepo

rpc GetRepo(GetRepoRequest) returns (Repo)

Returns information about a repo.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/source.read_only
  • https://www.googleapis.com/auth/source.read_write
  • https://www.googleapis.com/auth/source.full_control
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

ListRepos

rpc ListRepos(ListReposRequest) returns (ListReposResponse)

Returns all repos belonging to a project. The sizes of the repos are not set by ListRepos. To get the size of a repo, use GetRepo.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/source.read_only
  • https://www.googleapis.com/auth/source.read_write
  • https://www.googleapis.com/auth/source.full_control
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

SetIamPolicy

rpc SetIamPolicy(SetIamPolicyRequest) returns (Policy)

Sets the access control policy on the specified resource. Replaces any existing policy.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/source.read_only
  • https://www.googleapis.com/auth/source.read_write
  • https://www.googleapis.com/auth/source.full_control
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

TestIamPermissions

rpc TestIamPermissions(TestIamPermissionsRequest) returns (TestIamPermissionsResponse)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/source.read_only
  • https://www.googleapis.com/auth/source.read_write
  • https://www.googleapis.com/auth/source.full_control
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

CreateRepoRequest

Request for CreateRepo

Fields
parent

string

The project in which to create the repo. Values are of the form projects/<project>.

Authorization requires the following Google IAM permission on the specified resource parent:

  • source.repos.create

repo

Repo

The repo to create. Only name should be set; setting other fields is an error. The project in the name should match the parent field.

DeleteRepoRequest

Request for DeleteRepo.

Fields
name

string

The name of the repo to delete. Values are of the form projects/<project>/repos/<repo>.

Authorization requires the following Google IAM permission on the specified resource name:

  • source.repos.delete

GetRepoRequest

Request for GetRepo.

Fields
name

string

The name of the requested repository. Values are of the form projects/<project>/repos/<repo>.

Authorization requires the following Google IAM permission on the specified resource name:

  • source.repos.get

ListReposRequest

Request for ListRepos.

Fields
name

string

The project ID whose repos should be listed. Values are of the form projects/<project>.

Authorization requires the following Google IAM permission on the specified resource name:

  • source.repos.list

page_size

int32

Maximum number of repositories to return; between 1 and 500. If not set or zero, defaults to 100 at the server.

page_token

string

Resume listing repositories where a prior ListReposResponse left off. This is an opaque token that must be obtained from a recent, prior ListReposResponse's next_page_token field.

ListReposResponse

Response for ListRepos. The size is not set in the returned repositories.

Fields
repos[]

Repo

The listed repos.

next_page_token

string

If non-empty, additional repositories exist within the project. These can be retrieved by including this value in the next ListReposRequest's page_token field.

MirrorConfig

Configuration to automatically mirror a repository from another hosting service, for example GitHub or BitBucket.

Fields
url

string

URL of the main repository at the other hosting service.

webhook_id

string

ID of the webhook listening to updates to trigger mirroring. Removing this webhook from the other hosting service will stop Google Cloud Source Repositories from receiving notifications, and thereby disabling mirroring.

deploy_key_id

string

ID of the SSH deploy key at the other hosting service. Removing this key from the other service would deauthorize Google Cloud Source Repositories from mirroring.

Repo

A repository (or repo) is a Git repository storing versioned source content.

Fields
name

string

Resource name of the repository, of the form projects/<project>/repos/<repo>. The repo name may contain slashes. eg, projects/myproject/repos/name/with/slash

size

int64

The disk usage of the repo, in bytes. Read-only field. Size is only returned by GetRepo.

url

string

URL to clone the repository from Google Cloud Source Repositories. Read-only field.

mirror_config

MirrorConfig

How this repository mirrors a repository managed by another service. Read-only field.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Source Repositories