turbot/bitbucket
steampipe plugin install bitbucket

Table: bitbucket_repository - Query Bitbucket Repositories using SQL

Bitbucket is a web-based version control repository hosting service owned by Atlassian, for source code and development projects that use either Mercurial or Git revision control systems. Bitbucket offers both commercial plans and free accounts. It provides free private repositories for small teams and also offers features such as pull requests, branching, and in-line commenting.

Table Usage Guide

The bitbucket_repository table provides insights into Bitbucket repositories within Atlassian's Bitbucket service. As a DevOps engineer, explore repository-specific details through this table, including repository name, UUID, project key, and other related details. Utilize it to uncover information about repositories, such as their status, metadata, and the projects they belong to.

Important Notes

  • You must specify the full_name in the where or join clause (where full_name=, join bitbucket_repository on full_name=) to query this table.

Examples

Get information about a specific repository

Explore specific information about a designated repository to understand its owner, unique identifier, and description. This is useful in gaining insights into the repository's details without having to manually search through Bitbucket.

select
name,
uuid,
full_name,
owner_display_name,
description
from
bitbucket_repository
where
full_name = 'bitbucketpipelines/official-pipes'
select
name,
uuid,
full_name,
owner_display_name,
description
from
bitbucket_repository
where
full_name = 'bitbucketpipelines/official-pipes'

Schema for bitbucket_repository

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
default_reviewersjsonbDetails of the default reviewers of the repository.
descriptiontextDescription of the repository.
fork_policytextControls the rules for forking this repository. "allow_forks": unrestricted forking, "no_public_forks": restrict forking to private forks (forks cannot be made public later) and "no_forks": deny all forking
full_nametext=The concatenation of the repository owner's username and the slugified name, e.g. "turbot/steampipe-plugin-bitbucket". This is the same string used in Bitbucket URLs.
has_issuestextTo initialize or disable the new repo's issue tracker
is_privatebooleanIndicates whether the repository is publicly accessible, or whether it is private to the team and consequently only visible to team members.
languagetextThe type of markup language the raw content is to be interpreted in.
mainbranchjsonbDetails of the main branch of the repository.
nametextThe name of repository.
owner_account_idtextJira account id of the owner.
owner_display_nametextDisplay name of the owner the repository.
owner_typetextType of the owner of the repository. Can be a user or team.
owner_uuidtextBitbucket UUID of the owner.
project_keytextKey of the project this repository belongs to.
project_nametextName of the project this repository belongs to.
project_uuidtextUUID of the project this repository belongs to.
self_linktextSelf link to this repository.
slugtextA repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextTitle of the resource.
uuidtextThe repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- bitbucket

You can pass the configuration to the command with the --config argument:

steampipe_export_bitbucket --config '<your_config>' bitbucket_repository