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, createdfrom bitbucket_my_project;
select name, uuid, key as project_key, workspace_slug, owner_display_name, is_private, createdfrom 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_namefrom bitbucket_my_repositorygroup by project_key, project_name, owner_display_nameorder by project_name;
select count(*), project_key, project_name, owner_display_namefrom bitbucket_my_repositorygroup by project_key, project_name, owner_display_nameorder 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_namefrom bitbucket_my_project as p left join bitbucket_my_repository as r on r.project_key = p.keygroup by p.key, p.name, p.owner_display_nameorder by count, p.name;
select count(r.project_key), p.key as project_key, p.name as project_name, p.owner_display_namefrom bitbucket_my_project as p left join bitbucket_my_repository as r on r.project_key = p.keygroup by p.key, p.name, p.owner_display_nameorder by count(r.project_key), p.name;
Schema for bitbucket_my_project
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
created | timestamp with time zone | Timestamp when project was last updated. | |
description | text | A usefule description for thr project. | |
is_private | boolean | Indicates 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. | |
key | text | The project's key. | |
name | text | The name of the project. | |
owner_display_name | text | Display name of the owner of this project. | |
owner_type | text | Type of the owner of this project. | |
owner_uuid | text | UUID of the owner of this project. | |
self_link | text | A self link to this project. | |
title | text | Title of the resource. | |
type | text | Type of the Bitbucket resource. | |
updated | timestamp with time zone | Timestamp when project was last updated. | |
uuid | text | The project's immutable id. | |
workspace_slug | text | Slug 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