github_actions_artifactgithub_actions_repository_runnergithub_actions_repository_secretgithub_actions_repository_workflow_rungithub_audit_loggithub_branchgithub_branch_protectiongithub_commitgithub_community_profilegithub_gistgithub_gitignoregithub_issuegithub_licensegithub_my_gistgithub_my_issuegithub_my_organizationgithub_my_repositorygithub_my_stargithub_my_teamgithub_organizationgithub_pull_requestgithub_rate_limitgithub_releasegithub_repositorygithub_search_codegithub_search_commitgithub_search_issuegithub_search_labelgithub_search_pull_requestgithub_search_repositorygithub_search_topicgithub_search_usergithub_stargazergithub_taggithub_teamgithub_team_membergithub_team_repositorygithub_traffic_view_dailygithub_traffic_view_weeklygithub_usergithub_workflow
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_loginsfrom github_issuewhere repository_full_name = 'turbot/steampipe';
List the unassigned open issues in a repository
select repository_full_name, issue_number, title, state, author_login, assignee_loginsfrom github_issuewhere 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, tagsfrom github_issuewhere 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_tofrom github_issue, jsonb_array_elements_text(assignee_logins) as assigned_towhere 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_issuesfrom github_issuewhere repository_full_name = 'turbot/steampipe'group by author_loginorder 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.titlefrom github_my_repository as r, github_issue as iwhere r.full_name like 'turbot/steampip%' and i.state = 'open' and i.repository_full_name = r.full_name;
Control examples
.inspect github_issue
GitHub Issues are used to track ideas, enhancements, tasks, or bugs for work on GitHub.
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
assignee_logins | jsonb | An array of user login names that are assigned to the issue. |
author_association | text | The association of the issue author to the repository (COLLABORATOR,CONTRIBUTOR, etc). |
author_login | text | The login name of the user that submitted the PR. |
body | text | The body of the issue text. |
closed_at | timestamp with time zone | The timestamp when the issue was closed. |
comments | bigint | The number of comments on the issue. |
comments_url | text | The API Comments URL. |
created_at | timestamp with time zone | The timestamp when the issue was created. |
events_url | text | The API Events URL. |
html_url | text | The URL of the issue page in GitHub. |
id | bigint | The unique ID number of the issue. |
issue_number | bigint | The issue number. |
labels | jsonb | An array of labels associated with this issue. |
labels_url | text | The API Labels URL. |
locked | boolean | If true, the issue is locked. |
milestone_id | bigint | The milestone id this issue is associated with. |
milestone_title | text | The title of the milestone this issue is associated with. |
node_id | text | The node id of the issue. |
reactions | jsonb | An object containing the count of various reactions on the issue. |
repository_full_name | text | The full name of the repository (login/repo-name). |
repository_url | text | The API Repository URL. |
state | text | The state or the issue (open, closed). |
tags | jsonb | A map of label names associated with this issue, in Steampipe standard format. |
title | text | The issue title. |
updated_at | timestamp with time zone | The timestamp when the issue was last updated. |
url | text | The API URL of the issue. |