turbot/github

GitHub
steampipe plugin install githubsteampipe plugin install github

Table: github_team_repository

A repository contains all of your project's files and each file's revision history.

The github_team_repository table can be used to query information about repositories that a team has access to. You must specify the organization and team slug in the where or join clause (where organization= AND slug=, join github_team_repository on organization= AND slug=).

To list all your repositories use the github_my_repository table instead. To get information about any repository, use the github_repository table instead.

Examples

List a specific team's repositories

select
organization,
slug as team_slug,
name,
permissions,
language,
forks_count,
stargazers_count,
subscribers_count,
description
from
github_team_repository
where
organization = 'my_org'
and slug = 'my-team';

List visible teams and repositories they have admin permissions to

select
t.organization as organization,
t.name as team_name,
t.slug as team_slug,
t.privacy as team_privacy,
t.description as team_description,
tr.name as repo_name,
tr.permissions as team_repo_permissions,
tr.fork as repo_is_fork,
tr.private as repo_is_private,
tr.archived as repo_is_archived,
tr.language as repo_primary_language
from
github_team as t,
github_team_repository AS tr
where
t.organization = tr.organization
and t.slug = tr.slug
and permissions ? 'admin';

.inspect github_team_repository

GitHub Repositories that a given team is associated with. GitHub Repositories contain all of your project's files and each file's revision history.

NameTypeDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
allow_merge_commitbooleanIf true, the repository allows merge commits.
allow_rebase_mergebooleanIf true, the repository allows rebase merges.
allow_squash_mergebooleanIf true, the repository allows squash merges.
archivedbooleanIf true, the repository is archived and read-only.
clone_urltextURL that can be provided to git clone to clone the repository via HTTPS.
code_of_conduct_keytextUnique key for code of conduct for the repository.
code_of_conduct_nametextName of the Code of Conduct for the repository.
code_of_conduct_urltextURL of the Code of Conduct for the repository.
collaborator_loginsjsonbAn array of logins for users (inside and outside collaborators) who have access to the repository.
collaboratorsjsonbAn array of users (teams and outside collaborators) who have access to the repository, including their permissions.
created_attimestamp with time zoneThe timestamp when the repository was created.
default_branchtextThe name of the deafult branch. The default branch is the base branch for pull requests and code commits.
delete_branch_on_mergebooleanIf enabled, branches are automatically deleted whe a PR is merged.
descriptiontextThe repository description.
disabledbooleanIf true, the repository is disabled.
forkbooleanIf true, this repository is a fork of another repository.
forks_countbigintThe number of repositories that have forked this repository.
full_nametextThe full name of the repository, including the owner and repo name.
git_urltextThe git url to clone this repo via the git protocol.
has_downloadsbooleanIf true, the GitHub Downloads feature is enabled on the repository.
has_issuesbooleanIf true, the GitHub Issues feature is enabled on the repository.
has_pagesbooleanIf true, the GitHub Pages feature is enabled on the repository.
has_projectsbooleanIf true, the GitHub Projects feature is enabled on the repository.
has_wikibooleanIf true, the GitHub Wiki feature is enabled on the repository.
homepagetextThe URL of a page describing the project.
hooksjsonbThe API Hooks URL.
html_urltextThe URL of the repo.
idbigintThe unique ID number of the repository.
is_templatebooleanIf true, the repository is a template repository.
languagetextThe repository language (JavaScript, Go, etc)
license_keytextThe key of the license associated with the repository.
license_nametextThe name of the license associated with the repository.
license_node_idtextThe node id of the license associated with the repository.
license_spdx_idtextThe Software Package Data Exchange (SPDX) id of the license associated with the repository.
license_urltextThe url of the license associated with the repository.
nametextThe name of the repository.
network_countbigintThe number of member repositories in the network.
node_idtextThe Node ID of the repository.
open_issues_countbigintThe number of open issues for the repository.
organizationtextThe organization the team is associated with.
outside_collaborator_loginsjsonbAn array of logins for outside collaborators who have access to the repository.
outside_collaboratorsjsonbAn array of outside collaborators who have access to the repository, including their permissions.
owner_idbigintThe user id (number) of the repository owner.
owner_logintextThe user login name of the repository owner.
owner_typetextThe type of the repository owner (User or Organization).
permissionsjsonbThe team's permissions for a repository.
privatebooleanIf true, the repo is private, otherwise it is public.
pushed_attimestamp with time zoneTimestamp of the last push to the repository.
sizebigintThe size of the whole repository (including history), in kilobytes.
slugtextThe team slug name.
ssh_urltextThe url to clone this repo via ssh.
stargazers_countbigintThe number of users who have 'starred' the repository.
subscribers_countbigintThe number of users who have subscribed to the repository.
template_repositorytextThe template repository used to create this resource.
topicsjsonbThe topics (similar to tags or labels) associated with the repository.
updated_attimestamp with time zoneTimestamp when the repository was last updated.
urltextThe url to clone this repo via https.
visibilitytextThe visibility of the repository (public or private)
watchers_countbigintThe number of users who have watched the repository.