Index
-
SourceRepo
(interface) -
CreateRepoRequest
(message) -
DeleteRepoRequest
(message) -
GetProjectConfigRequest
(message) -
GetRepoRequest
(message) -
ListReposRequest
(message) -
ListReposResponse
(message) -
MirrorConfig
(message) -
ProjectConfig
(message) -
PubsubConfig
(message) -
PubsubConfig.MessageFormat
(enum) -
Repo
(message) -
SyncRepoMetadata
(message) -
SyncRepoRequest
(message) -
UpdateProjectConfigRequest
(message) -
UpdateRepoRequest
(message)
SourceRepo
The Source Repo API service.
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 the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc DeleteRepo(
DeleteRepoRequest
) returns ( Empty
)
Deletes a repo.
- Authorization scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc GetIamPolicy(
GetIamPolicyRequest
) returns ( Policy
)
Gets the IAM policy policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
- Authorization scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc GetProjectConfig(
GetProjectConfigRequest
) returns ( ProjectConfig
)
Returns the Cloud Source Repositories configuration of the project.
- Authorization scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc GetRepo(
GetRepoRequest
) returns ( Repo
)
Returns information about a repo.
- Authorization scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
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 the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc SetIamPolicy(
SetIamPolicyRequest
) returns ( Policy
)
Sets the IAM policy on the specified resource. Replaces any existing policy.
- Authorization scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc SyncRepo(
SyncRepoRequest
) returns ( Operation
)
Synchronize a connected repo.
The response contains SyncRepoMetadata in the metadata field.
- Authorization scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
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 the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc UpdateProjectConfig(
UpdateProjectConfigRequest
) returns ( ProjectConfig
)
Updates the Cloud Source Repositories configuration of the project.
- Authorization scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
rpc UpdateRepo(
UpdateRepoRequest
) returns ( Repo
)
Updates information about a repo.
- Authorization scopes
-
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .
-
CreateRepoRequest
Request for CreateRepo
parent
string
The project in which to create the repo. Values are of the form projects/<project>
.
Authorization requires the following IAM
permission on the specified resource parent
:
-
source.repos.create
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.
name
string
The name of the repo to delete. Values are of the form projects/<project>/repos/<repo>
.
Authorization requires the following IAM
permission on the specified resource name
:
-
source.repos.delete
GetProjectConfigRequest
Request for GetProjectConfig.
name
string
The name of the requested project. Values are of the form projects/<project>
.
Authorization requires the following IAM
permission on the specified resource name
:
-
source.repos.getProjectConfig
GetRepoRequest
Request for GetRepo.
name
string
The name of the requested repository. Values are of the form projects/<project>/repos/<repo>
.
Authorization requires the following IAM
permission on the specified resource name
:
-
source.repos.get
ListReposRequest
Request for ListRepos.
name
string
The project ID whose repos should be listed. Values are of the form projects/<project>
.
Authorization requires the following 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[]
|
The listed repos. |
next_page_token
|
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
|
URL of the main repository at the other hosting service. |
webhook_id
|
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
|
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. |
ProjectConfig
Cloud Source Repositories configuration of a project.
Fields | |
---|---|
name
|
The name of the project. Values are of the form |
pubsub_configs
|
How this project publishes a change in the repositories through Cloud Pub/Sub. Keyed by the topic names. |
enable_private_key_check
|
Reject a Git push that contains a private key. |
PubsubConfig
Configuration to publish a Cloud Pub/Sub message.
Fields | |
---|---|
topic
|
A topic of Cloud Pub/Sub. Values are of the form |
service_account_email
|
Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account. |
MessageFormat
The format of the Cloud Pub/Sub messages.
Enums | |
---|---|
MESSAGE_FORMAT_UNSPECIFIED
|
Unspecified. |
PROTOBUF
|
The message payload is a serialized protocol buffer of SourceRepoEvent. |
JSON
|
The message payload is a JSON string of SourceRepoEvent. |
Repo
A repository (or repo) is a Git repository storing versioned source content.
Fields | |
---|---|
name
|
Resource name of the repository, of the form |
size
|
The disk usage of the repo, in bytes. Read-only field. Size is only returned by GetRepo. |
url
|
URL to clone the repository from Google Cloud Source Repositories. Read-only field. |
mirror_config
|
How this repository mirrors a repository managed by another service. Read-only field. |
pubsub_configs
|
How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names. |
SyncRepoMetadata
Metadata of SyncRepo.
This message is in the metadata field of Operation.
Fields | |
---|---|
name
|
The name of the repo being synchronized. Values are of the form |
start_time
|
The time this operation is started. |
update_time
|
The time this operation's status message is updated. |
SyncRepoRequest
Request for SyncRepo.
name
string
The name of the repo to synchronize. Values are of the form projects/<project>/repos/<repo>
.
Authorization requires the following IAM
permission on the specified resource name
:
-
source.repos.update
UpdateProjectConfigRequest
Request for UpdateProjectConfig.
name
string
The name of the requested project. Values are of the form projects/<project>
.
Authorization requires the following IAM
permission on the specified resource name
:
-
source.repos.updateProjectConfig
project_config
The new configuration for the project.
update_mask
A FieldMask specifying which fields of the project_config to modify. Only the fields in the mask will be modified. If no mask is provided, this request is no-op.
UpdateRepoRequest
Request for UpdateRepo.
name
string
The name of the requested repository. Values are of the form projects/<project>/repos/<repo>
.
Authorization requires the following IAM
permission on the specified resource name
:
-
source.repos.updateRepoConfig
repo
The new configuration for the repository.
update_mask
A FieldMask specifying which fields of the repo to modify. Only the fields in the mask will be modified. If no mask is provided, this request is no-op.