I am developing a script to notify me when a repository is made public in Bitbucket. I require a reliable method to verify this event. Currently, Audit logs only display message.content, which appears to be an unreliable indicator of visibility.
For reference, here is an example log:
[
{
"__typename": "AuditLogEvent",
"id": "1",
"type": "events",
"attributes": {
"__typename": "AuditLogAttributes",
"correlationId": null,
"action": "bitbucket_cloud_repository_privacy_setting_updated",
"actor": {
"__typename": "AuditLogActor",
"id": "7",
"onBehalfOf": null,
"account_id": null,
"account_type": null,
"name": "Sam",
"email": "",
"auth": null,
"links": {
"__typename": "AuditLogEventLink",
"alt": null,
"self": null
}
},
"container": [
{
"__typename": "AuditLogAttributesContainer",
"attributes": {
"__typename": "AuditLogAttributesContainerAttributes",
"issueKeyOrId": null,
"issueId": null,
"pageTitleOrId": null,
"siteName": null,
"pageId": null,
"siteHostName": null,
"tinyUiSuffix": null,
"product": null
},
"links": {
"__typename": "AuditLogEventLink",
"self": null
},
"type": "workspace"
},
{
"__typename": "AuditLogAttributesContainer",
"attributes": {
"__typename": "AuditLogAttributesContainerAttributes",
"issueKeyOrId": null,
"issueId": null,
"pageTitleOrId": null,
"siteName": null,
"pageId": null,
"siteHostName": null,
"tinyUiSuffix": null,
"product": null
},
"links": {
"__typename": "AuditLogEventLink",
"self": null
},
"type": "workspace"
}
],
"time": "2025-04-28T10:06:43.356Z"
},
"links": {
"__typename": "AuditLogEventLink",
"alt": null,
},
"message": {
"__typename": "AuditLogMessage",
"content": "{\"version\":1,\"type\":\"doc\",\"content\":[{\"content\":[{\"type\":\"text\",\"text\":\"Updated \"},{\"type\":\"text\",\"text\":\"name\",\"marks\":[{\"type\":\"strong\"},{\"type\":\"link\",\"attrs\":{\"href\":\"https://bitbucket.org/{asdf}\"}}]},{\"type\":\"text\",\"text\":\"/\"},{\"type\":\"text\",\"text\":\"testpublicproject\",\"marks\":[{\"type\":\"strong\"},{\"type\":\"link\",\"attrs\":{\"href\":\"https://bitbucket.org/{1d4651fc-1db4-4d11}\"}}]},{\"type\":\"text\",\"text\":\" repository to \"},{\"type\":\"text\",\"text\":\"private\",\"marks\":[{\"type\":\"strong\"}]}],\"type\":\"paragraph\"}]}",
"format": "some id here"
}
}
]
Hi archer,
Unfortunately, there is no endpoint for Bitbucket Cloud at this stage that can be contacted which will reliably display audit log entries with usable data - we have a feature request raised with our developers however that you may follow for future updates:
Cheers!
- Ben (Bitbucket Cloud Support)
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.