turbot/github

steampipe plugin install githubsteampipe plugin install github
On This Page
Get Involved

Table: github_issue

GitHub Issues are used to track ideas, enhancements, tasks, or bugs for work on GitHub.

The github_issue table can be used to query issues belonging to a repository, and you must specify which repository with where repository_full_name='owner/repository'. To list all the issues assigned to you across all repositories use the github_my_issue table instead.

Note that pull requests are technically also issues in GitHub, however we do not include them in the github_issue table; You should use the github_pull_request table to query PRs.

Examples

List the issues in a repository

select
repository_full_name,
issue_number,
title,
state,
author_login,
assignee_logins
from
github_issue
where
repository_full_name = 'turbot/steampipe';

List the unassigned open issues in a repository

select
repository_full_name,
issue_number,
title,
state,
author_login,
assignee_logins
from
github_issue
where
repository_full_name = 'turbot/steampipe'
and jsonb_array_length(assignee_logins) = 0
and state = 'open';

List the open issues in a repository with a given label

select
repository_full_name,
issue_number,
title,
state,
tags
from
github_issue
where
repository_full_name = 'turbot/steampipe'
and state = 'open'
and tags ? 'bug';

List the open issues in a repository assigned to a specific user

select
repository_full_name,
issue_number,
title,
state,
assigned_to
from
github_issue,
jsonb_array_elements_text(assignee_logins) as assigned_to
where
repository_full_name = 'turbot/steampipe'
and assigned_to = 'binaek89'
and state = 'open';

Report of the number issues in a repository by author

select
author_login,
count(*) as num_issues
from
github_issue
where
repository_full_name = 'turbot/steampipe'
group by
author_login
order by
num_issues desc;

Join with github_my_repository to find open issues in multiple repos that you own or contribute to

select
i.repository_full_name,
i.issue_number,
i.title
from
github_my_repository as r,
github_issue as i
where
r.full_name like 'turbot/steampip%'
and i.state = 'open'
and i.repository_full_name = r.full_name;

.inspect github_issue

GitHub Issues are used to track ideas, enhancements, tasks, or bugs for work on GitHub.

NameTypeDescription
assignee_loginsjsonbAn array of user login names that are assigned to the issue.
author_associationtextThe association of the issue author to the repository (COLLABORATOR,CONTRIBUTOR, etc).
author_logintextThe login name of the user that submitted the PR.
bodytextThe body of the issue text.
closed_attimestamp without time zoneThe timestamp when the issue was closed.
commentsbigintThe number of comments on the issue.
comments_urltextThe API Comments URL.
created_attimestamp without time zoneThe timestamp when the issue was created.
events_urltextThe API Events URL.
html_urltextThe URL of the issue page in GitHub.
idbigintThe unique ID number of the issue.
issue_numberbigintThe issue number.
labelsjsonbAn array of labels associated with this issue.
labels_urltextThe API Labels URL.
lockedbooleanIf true, the issue is locked.
milestone_idbigintThe milestone id this issue is associated with.
milestone_titletextThe title of the milestone this issue is associated with.
node_idtextThe node id of the issue.
reactionsjsonbAn object containing the count of various reactions on the issue.
repository_full_nametextThe full name of the repository (login/repo-name).
repository_urltextThe API Repository URL.
statetextThe state or the issue (open, closed).
tagsjsonbA map of label names associated with this issue, in Steampipe standard format.
titletextThe issue title.
updated_attimestamp without time zoneThe timestamp when the issue was last updated.
urltextThe API URL of the issue.