turbot/bitbucket
steampipe plugin install bitbucket

Table: bitbucket_my_project - Query Bitbucket Projects using SQL

Bitbucket Projects is a resource within Atlassian's Bitbucket that allows you to group your repositories into projects, making it easier to manage permissions and collaborate with your team. It provides a centralized way to manage and organize your repositories, giving you a higher level of control over your codebase. Bitbucket Projects helps you maintain a clean workspace and manage access to your repositories more efficiently.

Table Usage Guide

The bitbucket_my_project table provides insights into Bitbucket Projects within Atlassian's Bitbucket. As a software engineer or project manager, explore project-specific details through this table, including project keys, names, descriptions, and public access statuses. Utilize it to manage and organize your repositories, granting you a higher level of control over your codebase.

Important Notes

  • To query ANY project, including public projects, use the bitbucket_project table.

Examples

Get information about my projects

Explore your Bitbucket projects to gain insights into project names, unique identifiers, workspace slugs, ownership details, privacy status, and creation dates. This information can be useful for project management, tracking project ownership, and understanding the distribution of private and public projects.

select
name,
uuid,
key as project_key,
workspace_slug,
owner_display_name,
is_private,
created
from
bitbucket_my_project;
select
name,
uuid,
key as project_key,
workspace_slug,
owner_display_name,
is_private,
created
from
bitbucket_my_project;

List count of repositories by project

Analyze the distribution of repositories across various projects. This query can be used to understand the extent of codebase diversification within individual projects and identify those managed by specific owners.

select
count(*),
project_key,
project_name,
owner_display_name
from
bitbucket_my_repository
group by
project_key,
project_name,
owner_display_name
order by
project_name;
select
count(*),
project_key,
project_name,
owner_display_name
from
bitbucket_my_repository
group by
project_key,
project_name,
owner_display_name
order by
project_name;

List count of my repositories by project

Explore the distribution of your repositories across different projects. This can help in understanding how your projects are structured and where the majority of your repositories are concentrated.

select
count(r.project_key),
p.key as project_key,
p.name as project_name,
p.owner_display_name
from
bitbucket_my_project as p
left join bitbucket_my_repository as r on r.project_key = p.key
group by
p.key,
p.name,
p.owner_display_name
order by
count,
p.name;
select
count(r.project_key),
p.key as project_key,
p.name as project_name,
p.owner_display_name
from
bitbucket_my_project as p
left join bitbucket_my_repository as r on r.project_key = p.key
group by
p.key,
p.name,
p.owner_display_name
order by
count(r.project_key),
p.name;

Schema for bitbucket_my_project

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
createdtimestamp with time zoneTimestamp when project was last updated.
descriptiontextA usefule description for thr project.
is_privatebooleanIndicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.
keytextThe project's key.
nametextThe name of the project.
owner_display_nametextDisplay name of the owner of this project.
owner_typetextType of the owner of this project.
owner_uuidtextUUID of the owner of this project.
self_linktextA self link to this project.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextTitle of the resource.
typetextType of the Bitbucket resource.
updatedtimestamp with time zoneTimestamp when project was last updated.
uuidtextThe project's immutable id.
workspace_slugtextSlug name of the workspace to which this project belongs.

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_my_project