Bitbucket Cloud repository deletion custom notification

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

  • This informative article provides guidance on how to receive notifications when a repository is deleted from your Bitbucket Cloud workspace using the Atlassian Guard product.

  • As an administrator of your Bitbucket Cloud workspace, you will receive email notifications by default if a repository is deleted. If you wish to receive additional custom notifications, you can refer to the "Solution" section for instructions.

Please note that this information is only applicable if you are using the Atlassian Guard product.

Solution

You can utilise the Bitbucket audit logs that are now available in Atlassian Guard. To do so, follow these steps to connect your Bitbucket Cloud workspace to your Atlassian Guard organization:

  1. Navigate to http://admin.atlassian.com/ and select your organization (if you have more than one).

  2. Then, choose Products > ... > Link products.

After completing this step, you will be able to use the organization REST API against your Atlassian Guard to obtain the audit logs and parse the specific event for repository deletions.

  • For added convenience, you may also create a script to run on a daily basis and notify yourself or others if a recent repository deletion has occurred.

  • If you are using Bitbucket Cloud Pipelines, you can use Scheduled builds to trigger your custom script on a daily or weekly basis

Updated on March 5, 2025

Still need help?

The Atlassian Community is here for you.