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, sizefrom azuredevops_git_repository;
select id, name, default_branch, is_fork, project_id, sizefrom 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, sizefrom azuredevops_git_repositorywhere is_fork;
select id, name, default_branch, is_fork, project_id, sizefrom azuredevops_git_repositorywhere 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, sizefrom azuredevops_git_repositorywhere project ->> 'name' = 'private_project';
select id, name, default_branch, is_fork, project_id, sizefrom azuredevops_git_repositorywhere json_extract(project, '$.name') = 'private_project';
Schema for azuredevops_git_repository
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
default_branch | text | The repository default branch. | |
id | text | = | The repository id. |
is_fork | boolean | True if the repository was created as a fork. | |
links | jsonb | The class to represent a collection of REST reference links. | |
name | text | The repository name. | |
organization | text | =, !=, ~~, ~~*, !~~, !~~* | The name of the organization. |
parent_repository | jsonb | The parent repository. | |
project | jsonb | The project this repository belongs to. | |
project_id | text | = | The project Id. |
remote_url | text | The repository remote url. | |
size | text | Compressed size (bytes) of the repository. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
ssh_url | text | The repository ssh url. | |
title | text | Title of the resource. | |
url | text | The repository url. | |
valid_remote_urls | jsonb | The repository valid remote urls. | |
web_url | text | The 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