turbot/github

GitHub
steampipe plugin install githubsteampipe plugin install github

Table: github_my_organization

Organizations are shared accounts where businesses and open-source projects can collaborate across many projects at once. Owners and administrators can manage member access to the organization's data and projects with sophisticated security and administrative features.

The github_my_organization table will list the organization that you are a member of. To view details of ANY organization, use the github_organization table.

Examples

Basic info for the GitHub Organizations to which you belong

select
login as organization,
name,
twitter_username,
private_repositories_total_count as private_repos,
public_repositories_total_count as public_repos,
created_at,
updated_at,
is_verified,
teams_total_count as teams_count,
members_with_role_total_count as member_count,
url
from
github_my_organization;

Show all members for the GitHub Organizations to which you belong

select
o.login as organization,
m.login as member_login
from
github_my_organization o
join github_organization_member m on o.login = m.organization;

Show your permissions on the Organization

select
login as organization,
members_with_role_total_count as members_count,
can_administer,
can_changed_pinned_items,
can_create_projects,
can_create_repositories,
can_create_teams,
is_a_member as current_member
from
github_my_organization;

Show Organization security settings

select
login as organization,
members_with_role_total_count as members_count,
members_allowed_repository_creation_type,
members_can_create_internal_repos,
members_can_create_pages,
members_can_create_private_repos,
members_can_create_public_repos,
members_can_create_repos,
default_repo_permission,
two_factor_requirement_enabled
from
github_my_organization;

List organization hooks that are insecure

select
login as organization,
hook
from
github_my_organization,
jsonb_array_elements(hooks) as hook
where
hook -> 'config' ->> 'insecure_ssl' = '1'
or hook -> 'config' ->> 'secret' is null
or hook -> 'config' ->> 'url' not like '%https:%';

Query examples

Control examples

.inspect github_my_organization

GitHub Organizations that you are a member of. GitHub Organizations are shared accounts where businesses and open-source projects can collaborate across many projects at once.

NameTypeDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
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.
logintextThe login name of the organization.
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.
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.