steampipe plugin install github

Table: github_organization - Query GitHub Organizations using SQL

GitHub Organizations is a feature within GitHub that allows users to collaborate across many projects at once. Organizations include features such as unified billing, access control, and multiple repositories. It is a way for businesses and open-source projects to manage their projects and teams.

Table Usage Guide

The github_organization table provides insights into Organizations within GitHub. As a developer or project manager, explore organization-specific details through this table, including profile information, public repository count, and associated metadata. Utilize it to uncover information about organizations, such as their location, public repository count, and other profile details.

Important Notes

  • You must specify the login column in where or join clause to query the table.
  • To list organizations that you are a member of, use the github_my_organization table.

Examples

Basic info for a GitHub Organization

Explore essential details about a specific GitHub organization to understand its structure and activity. This is useful for gaining insights into the organization's verification status, team and member counts, and repository count.

select
login as organization,
name,
twitter_username,
created_at,
updated_at,
is_verified,
teams_total_count as teams_count,
members_with_role_total_count as member_count,
repositories_total_count as repo_count
from
github_organization
where
login = 'postgres';
select
login as organization,
name,
twitter_username,
created_at,
updated_at,
is_verified,
teams_total_count as teams_count,
members_with_role_total_count as member_count,
repositories_total_count as repo_count
from
github_organization
where
login = 'postgres';

List members of an organization

This query is used to identify members of a specific organization and check if they have two-factor authentication enabled. This can be useful for organizations looking to enforce security measures and ensure all members have additional protection for their accounts.

select
o.login as organization,
m.login as user_login,
m.has_two_factor_enabled as mfa_enabled
from
github_organization o,
github_organization_member m
where
o.login = 'turbot'
and o.login = m.organization;
select
o.login as organization,
m.login as user_login,
m.has_two_factor_enabled as mfa_enabled
from
github_organization o
join github_organization_member m on o.login = m.organization
where
o.login = 'turbot';

OR

select
organization,
login as user_login,
has_two_factor_enabled as mfa_enabled
from
github_organization_member
where
organization = 'turbot';
select
organization,
login as user_login,
has_two_factor_enabled as mfa_enabled
from
github_organization_member
where
organization = 'turbot';

Schema for github_organization

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
announcementtextThe text of the announcement.
announcement_expires_attimestamp with time zoneThe expiration date of the announcement, if any.
announcement_user_dismissiblebooleanIf true, the announcement can be dismissed by the user.
any_pinnable_itemsbooleanIf true, this organization has items that can be pinned to their profile.
avatar_urltextURL pointing to the organization's public avatar.
billing_emailtextThe email address for billing.
can_administerbooleanIf true, you can administer the organization.
can_changed_pinned_itemsbooleanIf true, you can change the pinned items on the organization's profile.
can_create_projectsbooleanIf true, you can create projects for the organization.
can_create_repositoriesbooleanIf true, you can create repositories for the organization.
can_create_teamsbooleanIf true, you can create teams within the organization.
can_sponsorbooleanIf true, you can sponsor this organization.
collaboratorsbigintThe number of collaborators for the organization.
created_attimestamp with time zoneTimestamp when the organization was created.
default_repo_permissiontextThe default repository permissions for the organization.
descriptiontextThe description of the organization.
emailtextThe email address associated with the organization.
estimated_next_sponsors_payout_in_centsbigintThe estimated next GitHub Sponsors payout for this organization in cents (USD).
followersbigintThe number of users following the organization.
followingbigintThe number of users followed by the organization.
has_organization_projectsbooleanIf true, the organization can use organization projects.
has_repository_projectsbooleanIf true, the organization can use repository projects.
has_sponsors_listingbooleanIf true, this organization has a GitHub Sponsors listing.
hooksjsonbThe Hooks of the organization.
idbigintThe ID number of the organization.
interaction_abilityjsonbThe interaction ability settings for this organization.
is_a_memberbooleanIf true, you are an active member of the organization.
is_followingbooleanIf true, you are following the organization.
is_sponsoringbooleanIf true, you are sponsoring the organization.
is_sponsoring_youbooleanIf true, you are sponsored by this organization.
is_verifiedbooleanIf true, the organization has verified its profile email and website.
locationtextThe organization's public profile location.
logintext=The login name of the organization.
login_idtext=, !=, ~~, ~~*, !~~, !~~*Unique identifier for the user login.
members_allowed_repository_creation_typetextSpecifies which types of repositories non-admin organization members can create
members_can_create_internal_reposbooleanIf true, members can create internal repositories.
members_can_create_pagesbooleanIf true, members can create pages.
members_can_create_private_reposbooleanIf true, members can create private repositories.
members_can_create_public_reposbooleanIf true, members can create public repositories.
members_can_create_reposbooleanIf true, members can create repositories.
members_can_fork_private_reposbooleanIf true, members can fork private organization repositories.
members_with_role_total_countbigintCount of members with a role within the organization.
monthly_estimated_sponsors_income_in_centsbigintThe estimated monthly GitHub Sponsors income for this organization in cents (USD).
nametextThe display name of the organization.
new_team_urltextURL for creating a new team.
node_idtextThe node ID of the organization.
packages_total_countbigintCount of packages within the organization.
pinnable_items_total_countbigintCount of pinnable items within the organization.
pinned_items_remainingbigintReturns how many more items this organization can pin to their profile.
pinned_items_total_countbigintCount of itesm pinned to the organization's profile.
plan_filled_seatsbigintThe number of used seats for the plan.
plan_nametextThe name of the GitHub plan.
plan_private_reposbigintThe number of private repositories for the plan.
plan_seatsbigintThe number of available seats for the plan
plan_spacebigintThe total space allocated for the plan.
private_repositories_total_countbigintCount of private repositories within the organization.
projects_total_countbigintCount of projects within the organization.
projects_urltextURL listing organization's projects.
projects_v2_total_countbigintCount of V2 projects within the organization.
public_repositories_total_countbigintCount of public repositories within the organization.
repositories_total_countbigintCount of all repositories within the organization.
repositories_total_disk_usagebigintTotal disk usage for all repositories within the organization.
saml_identity_providerjsonbThe Organization's SAML identity provider. Visible to (1) organization owners, (2) organization owners' personal access tokens (classic) with read:org or admin:org scope, (3) GitHub App with an installation token with read or write access to members, else null.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
sponsoring_total_countbigintCount of users the organization is sponsoring.
sponsors_listingjsonbThe GitHub sponsors listing for this organization.
sponsors_total_countbigintCount of sponsors the organization has.
teams_total_countbigintCount of teams within the organization.
teams_urltextURL listing organization's teams.
total_sponsorship_amount_as_sponsor_in_centsbigintThe amount in United States cents (e.g., 500 = $5.00 USD) that this entity has spent on GitHub to fund sponsorships. Only returns a value when viewed by the user themselves or by a user who can manage sponsorships for the requested organization.
twitter_usernametextThe organization's Twitter username.
two_factor_requirement_enabledbooleanIf true, all members in the organization must have two factor authentication enabled.
updated_attimestamp with time zoneTimestamp when the organization was last updated.
urltextThe URL for this organization.
web_commit_signoff_requiredbooleanIf true, contributors are required to sign off on web-based commits for repositories in this organization.
website_urltextURL for the organization's public website.

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_organization