Table: github_issue_comment - Query GitHub Issue Comments using SQL
GitHub Issue Comments are integral parts of the GitHub platform that enable users to discuss and provide feedback on particular issues within a repository. They serve as a platform for collaboration and can contain important information, updates, or solutions related to the issue at hand. GitHub Issue Comments are particularly useful for tracking the progress of issue resolution and fostering collaborative problem-solving.
Table Usage Guide
The github_issue_comment
table provides in-depth insights into Issue Comments within GitHub. As a project manager or developer, explore comment-specific details through this table, including the author, creation time, body of the comment, and associated metadata. Utilize it to track user interactions, gather feedback, monitor issue resolution progress, and encourage collaborative problem-solving.
Important Notes
- You must specify the
repository_full_name
column inwhere
orjoin
clause to query the table.
Examples
List comments for a specific issue
This query is useful for gaining insights into the discussion surrounding a specific issue within a specified GitHub repository. It helps identify the contributors, their comments, and the timeline of their interactions, which can be beneficial for understanding the development and resolution process of the issue.
select id, author_login, author_association, body_text, created_at, updated_at, published_at, last_edited_at, editor_login, urlfrom github_issue_commentwhere repository_full_name = 'turbot/steampipe-plugin-github' and number = 201;
select id, author_login, author_association, body_text, created_at, updated_at, published_at, last_edited_at, editor_login, urlfrom github_issue_commentwhere repository_full_name = 'turbot/steampipe-plugin-github' and number = 201;
List comments for your issues
Explore the dialogue associated with your issues on GitHub. This query helps you identify instances where a comment has been made on your issue, providing insights into who made the comment, the content of the comment, and when it was created.
select c.repository_full_name, c.number as issue, i.author_login as issue_author, c.author_login as comment_author, c.body_text as content, c.created_at as created, c.urlfrom github_issue_comment c join github_my_issue i on i.repository_full_name = c.repository_full_name and i.number = c.number;
select c.repository_full_name, c.number as issue, i.author_login as issue_author, c.author_login as comment_author, c.body_text as content, c.created_at as created, c.urlfrom github_issue_comment c join github_my_issue i on i.repository_full_name = c.repository_full_name and i.number = c.number;
List comments for a specific issue which match a certain body content
This query is useful when you want to pinpoint specific comments within a particular issue in a GitHub repository that contain a certain keyword in their content. It can help manage and analyze the discussion within the issue, especially when looking for mentions of a specific topic or term.
select id, number as issue, author_login as comment_author, author_association, body_text as content, created_at, urlfrom github_issue_commentwhere repository_full_name = 'turbot/steampipe-plugin-github' and number = 201 and body_text ~~* '%branch%';
select id, number as issue, author_login as comment_author, author_association, body_text as content, created_at, urlfrom github_issue_commentwhere repository_full_name = 'turbot/steampipe-plugin-github' and number = 201 and body_text like '%branch%';
Schema for github_issue_comment
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
author | jsonb | The actor who authored the comment. | |
author_association | text | Author's association with the subject of the issue/pr the comment was raised on. | |
author_login | text | The login of the comment author. | |
body | text | The contents of the comment as markdown. | |
body_text | text | The contents of the comment as text. | |
can_delete | boolean | If true, user can delete the comment. | |
can_minimize | boolean | If true, user can minimize the comment. | |
can_react | boolean | If true, user can react to the comment. | |
can_update | boolean | If true, user can update the comment. | |
cannot_update_reasons | jsonb | A list of reasons why user cannot update the comment. | |
created_at | timestamp with time zone | Timestamp when comment was created. | |
created_via_email | boolean | If true, comment was created via email. | |
did_author | boolean | If true, user authored the comment. | |
editor | jsonb | The actor who edited the comment. | |
editor_login | text | The login of the comment editor. | |
id | bigint | The ID of the comment. | |
includes_created_edit | boolean | If true, comment was edited and includes an edit with the creation data. | |
is_minimized | boolean | If true, comment has been minimized. | |
last_edited_at | timestamp with time zone | Timestamp when comment was last edited. | |
login_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the user login. |
minimized_reason | text | The reason for comment being minimized. | |
node_id | text | The node ID of the comment. | |
number | bigint | = | The issue/pr number. |
published_at | timestamp with time zone | Timestamp when comment was published. | |
repository_full_name | text | = | The full name of the repository (login/repo-name). |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
updated_at | timestamp with time zone | Timestamp when comment was last updated. | |
url | text | URL for the comment. |
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_issue_comment