Source Repositories

2. Notifications

  • Cloud Source Repositories publishes messages about repository to named resources called topics. 
  • Apps subscribed to Pub/Sub topics can receive these messages. 
  • When repository state changes, can receive an alert. 
  • Can configure roles and permissions for Pub/Sub topics to control how users interact with the Pub/Sub events that the repository generates.
  • Can configure Cloud Source Repositories to publish events to a Pub/Sub topic. 
  • Can set the scope of this configuration to be the entire Google Cloud project or an individual repository.
  • After it is configured, Cloud Source Repositories publishes messages to the specified Pub/Sub topic using a service account. 
  • Give the service account permissions to publish to the topic. 
  • With audit logging enabled for Pub/Sub, this service account is shown as the caller of the Pub/Sub APIs.
  • Pub/Sub can notify when a user creates a repository, deletes a repository, or pushes a commit to a repository. 
  • Each event is a specific event type.