steampipe plugin install github

Table: github_pull_request_comment - Query GitHub Pull Request Comments using SQL

GitHub Pull Request Comments are individual responses or feedbacks given on a pull request in a GitHub repository. These comments facilitate discussions on proposed changes in the codebase, allowing for collaborative decision-making and code review. They represent an integral part of the code review process in GitHub, fostering effective communication and quality control among contributors.

Table Usage Guide

The github_pull_request_comment table provides insights into the comments made on pull requests within a GitHub repository. As a developer or project manager, explore comment-specific details through this table, including the comment content, author, creation date, and associated metadata. Utilize it to understand the discussions and feedback on pull requests, facilitating effective code reviews and collaborative decision-making.

Important Notes

  • You must specify the repository_full_name (repository including org/user prefix) and number (of the issue) columns in the where or join clause to query the table.

Examples

List all comments for a specific pull request

Determine the areas in which user comments on a particular pull request can provide valuable insights. This query is useful for understanding user engagement and feedback on specific code changes in a GitHub repository.

select
id,
author_login,
author_association,
body_text,
created_at,
updated_at,
published_at,
last_edited_at,
editor_login,
url
from
github_pull_request_comment
where
repository_full_name = 'turbot/steampipe-plugin-github'
and number = 207;
select
id,
author_login,
author_association,
body_text,
created_at,
updated_at,
published_at,
last_edited_at,
editor_login,
url
from
github_pull_request_comment
where
repository_full_name = 'turbot/steampipe-plugin-github'
and number = 207;

List comments for a specific pull request which match a certain body content

Determine the comments for a specific project update that contain a particular keyword. This is useful for filtering and understanding discussions related to specific topics or issues in your project.

select
id,
number as issue,
author_login as comment_author,
author_association,
body_text as content,
created_at,
url
from
github_pull_request_comment
where
repository_full_name = 'turbot/steampipe-plugin-github'
and number = 207
and body_text ~~* '%DELAY%';
select
id,
number as issue,
author_login as comment_author,
author_association,
body_text as content,
created_at,
url
from
github_pull_request_comment
where
repository_full_name = 'turbot/steampipe-plugin-github'
and number = 207
and body_text like '%DELAY%';

List comments for all open pull requests from a specific repository

Explore the discussion around ongoing modifications in a specific project by viewing the comments on all open pull requests. This can aid in understanding the current issues, proposed solutions, and overall progress of the project.

select
c.*
from
github_pull_request r
join github_pull_request_comment c on r.repository_full_name = c.repository_full_name
and r.number = c.number
where
r.repository_full_name = 'turbot/steampipe-plugin-github'
and r.state = 'OPEN';
select
c.*
from
github_pull_request r
join github_pull_request_comment c on r.repository_full_name = c.repository_full_name
and r.number = c.number
where
r.repository_full_name = 'turbot/steampipe-plugin-github'
and r.state = 'OPEN';

Schema for github_pull_request_comment

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
authorjsonbThe actor who authored the comment.
author_associationtextAuthor's association with the subject of the issue/pr the comment was raised on.
author_logintextThe login of the comment author.
bodytextThe contents of the comment as markdown.
body_texttextThe contents of the comment as text.
can_deletebooleanIf true, user can delete the comment.
can_minimizebooleanIf true, user can minimize the comment.
can_reactbooleanIf true, user can react to the comment.
can_updatebooleanIf true, user can update the comment.
cannot_update_reasonsjsonbA list of reasons why user cannot update the comment.
created_attimestamp with time zoneTimestamp when comment was created.
created_via_emailbooleanIf true, comment was created via email.
did_authorbooleanIf true, user authored the comment.
editorjsonbThe actor who edited the comment.
editor_logintextThe login of the comment editor.
idbigintThe ID of the comment.
includes_created_editbooleanIf true, comment was edited and includes an edit with the creation data.
is_minimizedbooleanIf true, comment has been minimized.
last_edited_attimestamp with time zoneTimestamp when comment was last edited.
minimized_reasontextThe reason for comment being minimized.
node_idtextThe node ID of the comment.
numberbigint=The issue/pr number.
published_attimestamp with time zoneTimestamp when comment was published.
repository_full_nametext=The full name of the repository (login/repo-name).
updated_attimestamp with time zoneTimestamp when comment was last updated.
urltextURL 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_pull_request_comment