turbot/azuredevops
steampipe plugin install azuredevops

Table: azuredevops_git_repository - Query Azure DevOps Git Repositories using SQL

Azure DevOps is a service from Microsoft that provides developer services for support teams to plan work, collaborate on code development, and build and deploy applications. Git Repositories in Azure DevOps are part of the version control system that allows developers to collaborate on code development. It provides a place for teams to store, version, and share source code.

Table Usage Guide

The azuredevops_git_repository table provides insights into Git Repositories within Azure DevOps. As a DevOps engineer, explore repository-specific details through this table, including project association, repository name, size, and other associated metadata. Utilize it to uncover information about repositories, such as their default branch, web URL, and the verification of their visibility and fork status.

Examples

Basic info

Gain insights into the general information of your AzureDevOps Git repositories, such as whether they are forks or not and their size. This can help with project management and resource allocation.

select
id,
name,
default_branch,
is_fork,
project_id,
size
from
azuredevops_git_repository;
select
id,
name,
default_branch,
is_fork,
project_id,
size
from
azuredevops_git_repository;

List forked repositories

Explore which repositories in your Azure DevOps have been forked. This can help identify duplicated or shared project resources, aiding in project management and resource allocation.

select
id,
name,
default_branch,
is_fork,
project_id,
size
from
azuredevops_git_repository
where
is_fork;
select
id,
name,
default_branch,
is_fork,
project_id,
size
from
azuredevops_git_repository
where
is_fork;

List repositories of a particular project

Explore the different repositories associated with a specific project to gain insights into their default branches, size, and whether they are a fork of another repository. This is useful for managing and understanding the structure of a particular project in Azure DevOps.

select
id,
name,
default_branch,
is_fork,
project_id,
size
from
azuredevops_git_repository
where
project ->> 'name' = 'private_project';
select
id,
name,
default_branch,
is_fork,
project_id,
size
from
azuredevops_git_repository
where
json_extract(project, '$.name') = 'private_project';

Schema for azuredevops_git_repository

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
default_branchtextThe repository default branch.
idtext=The repository id.
is_forkbooleanTrue if the repository was created as a fork.
linksjsonbThe class to represent a collection of REST reference links.
nametextThe repository name.
parent_repositoryjsonbThe parent repository.
projectjsonbThe project this repository belongs to.
project_idtext=The project Id.
remote_urltextThe repository remote url.
sizetextCompressed size (bytes) of the repository.
ssh_urltextThe repository ssh url.
titletextTitle of the resource.
urltextThe repository url.
valid_remote_urlsjsonbThe repository valid remote urls.
web_urltextThe repository web url.

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)" -- azuredevops

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

steampipe_export_azuredevops --config '<your_config>' azuredevops_git_repository