steampipe plugin install github

Table: github_my_team - Query GitHub Teams using SQL

GitHub Teams is a feature within GitHub that allows for easy collaboration and access management within repositories. Teams can have different access rights to repositories and can consist of any number of users. Teams are a convenient way to manage large groups of users, both for assigning access rights and for mentioning multiple users at once.

Table Usage Guide

The github_my_team table provides insights into Teams within GitHub. As a developer or project manager, explore team-specific details through this table, including access rights, team structure and associated repositories. Utilize it to uncover information about teams, such as those with admin access to repositories, the distribution of access rights within a team, and the verification of team members.

Important Notes

  • To view all teams you have visibility to across your organizations, use the github_team table.

Examples

Basic info

Discover the segments that make up your GitHub team, including the number of members and repositories, to gain insights into the team's structure and activities. This allows for better management and allocation of resources within the team.

select
name,
slug,
description,
organization,
members_total_count,
repositories_total_count
from
github_my_team;
select
name,
slug,
description,
organization,
members_total_count,
repositories_total_count
from
github_my_team;

Get organization permission for each team

Explore which permissions each team in your organization has on GitHub. This can help you manage access controls and ensure the right teams have the right permissions.

select
name,
organization,
privacy
from
github_my_team;
select
name,
organization,
privacy
from
github_my_team;

Get parent team details for child teams

Determine the hierarchical structure within your GitHub organization by identifying which sub-teams have a parent team. This can help in understanding the team dynamics and collaboration structure within your organization.

select
slug,
organization,
parent_team ->> 'id' as parent_team_id,
parent_team ->> 'slug' as parent_team_slug
from
github_my_team
where
parent_team is not null;
select
slug,
organization,
json_extract(parent_team, '$.id') as parent_team_id,
json_extract(parent_team, '$.slug') as parent_team_slug
from
github_my_team
where
parent_team is not null;

Schema for github_my_team

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
ancestors_total_countbigintCount of ancestors this team has.
avatar_urltextURL for teams avatar.
can_administerbooleanIf true, current user can administer the team.
can_subscribebooleanIf true, current user can subscribe to the team.
child_teams_total_countbigintCount of children teams this team has.
combined_slugtextThe slug corresponding to the organization and the team.
created_attimestamp with time zoneTimestamp when team was created.
descriptiontextThe description of the team.
discussions_total_countbigintCount of team discussions.
discussions_urltextURL for team discussions.
edit_team_urltextURL for editing this team.
idbigintThe ID of the team.
invitations_total_countbigintCount of outstanding team member invitations for the team.
members_total_countbigintCount of team members.
members_urltextURL for team members.
nametextThe name of the team.
new_team_urltextThe HTTP URL creating a new team.
node_idtextThe node id of the team.
organizationtext=The organization the team is associated with.
parent_teamjsonbThe teams parent team.
privacytextThe privacy setting of the team (VISIBLE or SECRET).
projects_v2_total_countbigintCount of the teams v2 projects.
repositories_total_countbigintCount of repositories the team has.
repositories_urltextURL for team repositories.
slugtext=The team slug name.
subscriptiontextSubscription status of the current user to the team.
teams_urltextURL for this team's teams.
updated_attimestamp with time zoneTimestamp when team was last updated.
urltextURL for the team page in GitHub.

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

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

steampipe_export_github --config '<your_config>' github_my_team