diff --git a/.github/workflows/steampipe-anywhere.yml b/.github/workflows/steampipe-anywhere.yml
new file mode 100644
index 00000000..05092d63
--- /dev/null
+++ b/.github/workflows/steampipe-anywhere.yml
@@ -0,0 +1,12 @@
+name: Release Steampipe Anywhere Components
+
+on:
+ push:
+ tags:
+ - 'v*'
+
+
+jobs:
+ anywhere_publish_workflow:
+ uses: turbot/steampipe-workflows/.github/workflows/steampipe-anywhere.yml@main
+ secrets: inherit
diff --git a/README.md b/README.md
index cc75da5c..7091d2cf 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,18 @@ from
github_my_repository;
```
+## Engines
+
+This plugin is available for the following engines:
+
+| Engine | Description
+|---------------|------------------------------------------
+| [Steampipe](https://steampipe.io/docs) | The Steampipe CLI exposes APIs and services as a high-performance relational database, giving you the ability to write SQL-based queries to explore dynamic data. Mods extend Steampipe's capabilities with dashboards, reports, and controls built with simple HCL. The Steampipe CLI is a turnkey solution that includes its own Postgres database, plugin management, and mod support.
+| [Postgres FDW](https://steampipe.io/docs/steampipe_postgres/index) | Steampipe Postgres FDWs are native Postgres Foreign Data Wrappers that translate APIs to foreign tables. Unlike Steampipe CLI, which ships with its own Postgres server instance, the Steampipe Postgres FDWs can be installed in any supported Postgres database version.
+| [SQLite Extension](https://steampipe.io/docs//steampipe_sqlite/index) | Steampipe SQLite Extensions provide SQLite virtual tables that translate your queries into API calls, transparently fetching information from your API or service as you request it.
+| [Export](https://steampipe.io/docs/steampipe_export/index) | Steampipe Plugin Exporters provide a flexible mechanism for exporting information from cloud services and APIs. Each exporter is a stand-alone binary that allows you to extract data using Steampipe plugins without a database.
+| [Turbot Pipes](https://turbot.com/pipes/docs) | Turbot Pipes is the only intelligence, automation & security platform built specifically for DevOps. Pipes provide hosted Steampipe database instances, shared dashboards, snapshots, and more.
+
## Developing
Prerequisites:
@@ -84,11 +96,17 @@ Further reading:
* [Writing plugins](https://steampipe.io/docs/develop/writing-plugins)
* [Writing your first table](https://steampipe.io/docs/develop/writing-your-first-table)
-## Contributing
+## Open Source & Contributing
+
+This repository is published under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) (source code) and [CC BY-NC-ND](https://creativecommons.org/licenses/by-nc-nd/2.0/) (docs) licenses. Please see our [code of conduct](https://github.com/turbot/.github/blob/main/CODE_OF_CONDUCT.md). We look forward to collaborating with you!
+
+[Steampipe](https://steampipe.io) is a product produced from this open source software, exclusively by [Turbot HQ, Inc](https://turbot.com). It is distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our [Open Source FAQ](https://turbot.com/open-source).
+
+## Get Involved
-Please see the [contribution guidelines](https://github.com/turbot/steampipe/blob/main/CONTRIBUTING.md) and our [code of conduct](https://github.com/turbot/steampipe/blob/main/CODE_OF_CONDUCT.md). Contributions to the plugin are subject to the [Apache 2.0 open source license](https://github.com/turbot/steampipe-plugin-github/blob/main/LICENSE).
+**[Join #steampipe on Slack →](https://turbot.com/community/join)**
-`help wanted` issues:
+Want to help but don't know where to start? Pick up one of the `help wanted` issues:
* [Steampipe](https://github.com/turbot/steampipe/labels/help%20wanted)
* [GitHub Plugin](https://github.com/turbot/steampipe-plugin-github/labels/help%20wanted)
diff --git a/docs/LICENSE b/docs/LICENSE
new file mode 100644
index 00000000..236ac28a
--- /dev/null
+++ b/docs/LICENSE
@@ -0,0 +1,402 @@
+Attribution-NonCommercial-NoDerivatives 4.0 International
+
+=======================================================================
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+=======================================================================
+
+Creative Commons Attribution-NonCommercial-NoDerivatives 4.0
+International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution-NonCommercial-NoDerivatives 4.0 International Public
+License ("Public License"). To the extent this Public License may be
+interpreted as a contract, You are granted the Licensed Rights in
+consideration of Your acceptance of these terms and conditions, and the
+Licensor grants You such rights in consideration of benefits the
+Licensor receives from making the Licensed Material available under
+these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+
+ c. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ d. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ e. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ f. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ g. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ h. NonCommercial means not primarily intended for or directed towards
+ commercial advantage or monetary compensation. For purposes of
+ this Public License, the exchange of the Licensed Material for
+ other material subject to Copyright and Similar Rights by digital
+ file-sharing or similar means is NonCommercial provided there is
+ no payment of monetary compensation in connection with the
+ exchange.
+
+ i. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ j. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ k. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part, for NonCommercial purposes only; and
+
+ b. produce and reproduce, but not Share, Adapted Material
+ for NonCommercial purposes only.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties, including when
+ the Licensed Material is used other than for NonCommercial
+ purposes.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material, You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ For the avoidance of doubt, You do not have permission under
+ this Public License to Share Adapted Material.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database for NonCommercial purposes
+ only and provided You do not Share Adapted Material;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+=======================================================================
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the “Licensor.” The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org.
\ No newline at end of file
diff --git a/docs/index.md b/docs/index.md
index bb0bb9d2..5bc68ea9 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,20 +1,21 @@
---
-org: Turbot
+organization: Turbot
category: ["software development"]
icon_url: "/images/plugins/turbot/github.svg"
brand_color: "#191717"
display_name: "GitHub"
-name: "github"
+short_name: "github"
description: "Steampipe plugin for querying GitHub Repositories, Organizations, and other resources."
-og_description: Use SQL to query repos, orgs and more from GitHub. Open source CLI. No DB required.
+og_description: "Use SQL to query repos, orgs and more from GitHub. Open source CLI. No DB required."
og_image: "/images/plugins/turbot/github-social-graphic.png"
+engines: ["steampipe", "sqlite", "postgres", "export"]
---
# GitHub + Steampipe
-[GitHub](https://www.github.com/) is a provider of Internet hosting for software development and version control using Git. It offers the distributed version control and source code management (SCM) functionality of Git, plus its own features.
+[Steampipe](https://steampipe.io) is an open-source zero-ETL engine to instantly query cloud APIs using SQL.
-[Steampipe](https://steampipe.io) is an open source CLI to instantly query cloud APIs using SQL.
+[GitHub](https://www.github.com/) is a provider of Internet hosting for software development and version control using Git. It offers the distributed version control and source code management (SCM) functionality of Git, plus its own features.
For example:
@@ -61,7 +62,7 @@ steampipe plugin install github
| Item | Description|
|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Credentials | The GitHub plugin uses a personal access token to authenticate to the GitHub APIs.
-| Permissions | You must create a [personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) and assign the following scopes:
- `repo` (all)
- `read:org`
- `gist`
- `read:user`
- `user:email`
+| Permissions | You must create a [personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) and assign the following scopes:
- `repo` (all)
- `read:org`
- `gist`
- `read:user`
- `user:email`
| Radius | The GitHub plugin query scope is generally the same as the GitHub API. Usually, this means you can list private resources that you have access to, as well as public resources that you own, or that are owned by organizations to which you belong. The same GitHub APIs are used to get information for public resources, but the public items are returned in list calls (because there would be too many). This has an interesting side effect in Steampipe in that you can sometimes query _a specific item_ by _a specific key column or columns_ that does not show up in a list query.
For example, `select * from github_my_organization` will list details about all the GitHub Organizations to which you belong. `select * from github_organization where login = 'postgres'` will show you the publicly available details about the `postgres` organization, which didn't show up in your first query! It works this way in Steampipe because [that's how it works in the API](https://docs.github.com/en/rest/reference/orgs#list-organizations-for-a-user). While this may seem counter-intuitive at first, it actually can be quite useful. |
| Resolution | 1. Credentials in the Steampipe configuration file (`~/.steampipe/config/github.spc`)
2. Credentials specified in environment variables, e.g., `GITHUB_TOKEN`.
@@ -86,8 +87,3 @@ connection "github" {
- `token` - [Personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) for your GitHub account. This can also be set via the `GITHUB_TOKEN` environment variable.
- `base_url` - GitHub Enterprise users have a custom URL location (e.g. `https://github.example.com`). Not required for GitHub cloud. This can also be via the `GITHUB_BASE_URL` environment variable.
-
-## Get involved
-
-- Open source: https://github.com/turbot/steampipe-plugin-github
-- Community: [Join #steampipe on Slack →](https://turbot.com/community/join)
diff --git a/docs/tables/github_actions_artifact.md b/docs/tables/github_actions_artifact.md
index 4832d66c..f2319277 100644
--- a/docs/tables/github_actions_artifact.md
+++ b/docs/tables/github_actions_artifact.md
@@ -1,14 +1,34 @@
-# Table: github_actions_artifact
+---
+title: "Steampipe Table: github_actions_artifact - Query GitHub Actions Artifacts using SQL"
+description: "Allows users to query GitHub Actions Artifacts, specifically the metadata and download URLs, providing insights into the artifacts generated by GitHub Actions workflows."
+---
-Artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. An artifact is a file or collection of files produced during a workflow run.
+# Table: github_actions_artifact - Query GitHub Actions Artifacts using SQL
-The `github_actions_artifact` table can be used to query information about any artifacts, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Actions Artifacts are the files created when you build and test your code. These artifacts allow you to persist data after a job has completed, and share that data with another job in the same workflow. An artifact can be a compile output, a log file, a test result, or any other data you want to preserve or share.
+
+## Table Usage Guide
+
+The `github_actions_artifact` table provides insights into artifacts generated by GitHub Actions workflows. As a software developer or DevOps engineer, explore artifact-specific details through this table, including metadata and download URLs. Utilize it to uncover information about artifacts, such as their size, download location, and associated workflow runs.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### List artifacts
+Explore which artifacts are associated with the 'turbot/steampipe' repository on GitHub. This can be useful for developers needing to understand or manage the resources related to this specific project.
+
+```sql+postgres
+select
+ *
+from
+ github_actions_artifact
+where
+ repository_full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
*
from
@@ -18,8 +38,22 @@ where
```
### List active artifacts
+Discover the segments that are active artifacts within a specific repository, which is useful in scenarios where you need to track and manage these artifacts for ongoing projects or maintenance tasks. This query enables you to focus on active artifacts, excluding those that have expired, to streamline your artifact management process.
+
+```sql+postgres
+select
+ id,
+ node_id,
+ name,
+ archive_download_url,
+ expired
+from
+ github_actions_artifact
+where
+ repository_full_name = 'turbot/steampipe' and not expired;
+```
-```sql
+```sql+sqlite
select
id,
node_id,
diff --git a/docs/tables/github_actions_repository_runner.md b/docs/tables/github_actions_repository_runner.md
index f90639ec..56dac746 100644
--- a/docs/tables/github_actions_repository_runner.md
+++ b/docs/tables/github_actions_repository_runner.md
@@ -1,14 +1,34 @@
-# Table: github_actions_repository_runner
+---
+title: "Steampipe Table: github_actions_repository_runner - Query GitHub Actions Repository Runners using SQL"
+description: "Allows users to query GitHub Actions Repository Runners, providing insights into the details of self-hosted runners for a repository."
+---
-A runner is a server that runs your workflows when they're triggered. Each runner can run a single job at a time. Self-hosted runners offer more control of hardware, operating system, and software tools than GitHub-hosted runners provide.
+# Table: github_actions_repository_runner - Query GitHub Actions Repository Runners using SQL
-The `github_actions_repository_runner` table can be used to query information about any self-hosted runner, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Actions is a CI/CD service provided by GitHub which allows automating software workflows. It enables developers to build, test, and deploy applications on GitHub, making it easier to integrate changes and deliver better software faster. A key feature of GitHub Actions is the ability to use self-hosted runners, which are servers with GitHub Actions runner application installed.
+
+## Table Usage Guide
+
+The `github_actions_repository_runner` table provides insights into the self-hosted runners of GitHub Actions for a specific repository. As a DevOps engineer, you can explore runner-specific details through this table, including runner IDs, names, operating systems, statuses, and associated metadata. Utilize it to manage and monitor your self-hosted runners, ensuring they are functioning properly and are up-to-date.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### List runners
+Explore which runners are associated with the 'turbot/steampipe' repository in GitHub Actions. This can be beneficial for maintaining and managing the performance and efficiency of your workflows.
-```sql
+```sql+postgres
+select
+ *
+from
+ github_actions_repository_runner
+where
+ repository_full_name = 'turbot/steampipe';
+```
+
+```sql+sqlite
select
*
from
@@ -18,8 +38,21 @@ where
```
### List runners with mac operating system
+Discover the segments that utilize a Mac operating system within a specific repository. This is beneficial for understanding the distribution of operating systems within your project, which can aid in troubleshooting and optimization efforts.
+
+```sql+postgres
+select
+ repository_full_name,
+ id,
+ name,
+ os
+from
+ github_actions_repository_runner
+where
+ repository_full_name = 'turbot/steampipe' and os = 'macos';
+```
-```sql
+```sql+sqlite
select
repository_full_name,
id,
@@ -32,8 +65,22 @@ where
```
### List runners which are in use currently
+This query allows you to identify which runners are currently in use in the specified repository. This can be beneficial for understanding the utilization of resources and managing workflow runs in real-time.
+
+```sql+postgres
+select
+ repository_full_name,
+ id,
+ name,
+ os,
+ busy
+from
+ github_actions_repository_runner
+where
+ repository_full_name = 'turbot/steampipe' and busy;
+```
-```sql
+```sql+sqlite
select
repository_full_name,
id,
diff --git a/docs/tables/github_actions_repository_secret.md b/docs/tables/github_actions_repository_secret.md
index 2c09aba2..bf58718d 100644
--- a/docs/tables/github_actions_repository_secret.md
+++ b/docs/tables/github_actions_repository_secret.md
@@ -1,14 +1,34 @@
-# Table: github_actions_repository_secret
+---
+title: "Steampipe Table: github_actions_repository_secret - Query GitHub Actions Repository Secrets using SQL"
+description: "Allows users to query GitHub Actions Repository Secrets, specifically to retrieve information about secrets stored in a GitHub repository, providing insights into the security measures in place."
+---
-Secrets are encrypted environment variables that you create in an organization.
+# Table: github_actions_repository_secret - Query GitHub Actions Repository Secrets using SQL
-The `github_actions_repository_secret` table can be used to query information about any organization secret, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Actions is a service provided by GitHub that allows you to automate, customize, and execute your software development workflows right in your repository. GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. It enables you to build, test, and deploy your code right from GitHub.
+
+## Table Usage Guide
+
+The `github_actions_repository_secret` table provides insights into secrets stored within a GitHub repository. As a security engineer, explore secret-specific details through this table, including the names of secrets and the dates they were created or updated. Utilize it to uncover information about secrets, such as those that may be outdated or unused, providing a comprehensive view of the repository's security measures.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### List secrets
+Explore the hidden aspects of a specific repository within the GitHub Actions environment. This is useful in assessing the security and integrity of the repository.
+
+```sql+postgres
+select
+ *
+from
+ github_actions_repository_secret
+where
+ repository_full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
*
from
diff --git a/docs/tables/github_actions_repository_workflow_run.md b/docs/tables/github_actions_repository_workflow_run.md
index b74ced3e..2e181297 100644
--- a/docs/tables/github_actions_repository_workflow_run.md
+++ b/docs/tables/github_actions_repository_workflow_run.md
@@ -1,14 +1,34 @@
-# Table: github_actions_repository_workflow_run
+---
+title: "Steampipe Table: github_actions_repository_workflow_run - Query GitHub Actions Repository Workflow Runs using SQL"
+description: "Allows users to query GitHub Actions Repository Workflow Runs, specifically the details of each workflow run in a repository, providing insights into the status, conclusion, and other metadata of the runs."
+---
-GitHub Actions lets you run workflows when other events happen in your repository. For example, you can run a workflow to automatically add the appropriate labels whenever someone creates a new issue in your repository.
+# Table: github_actions_repository_workflow_run - Query GitHub Actions Repository Workflow Runs using SQL
-The `github_actions_repository_workflow_run` table can be used to query information about any organization secret, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Actions is a CI/CD solution that allows you to automate how you build, test, and deploy your projects on any platform, including Linux, macOS, and Windows. It lets you run a series of commands in response to events on GitHub. With GitHub Actions, you can build end-to-end continuous integration (CI) and continuous deployment (CD) capabilities directly in your repository.
+
+## Table Usage Guide
+
+The `github_actions_repository_workflow_run` table provides insights into GitHub Actions Repository Workflow Runs. As a software developer or DevOps engineer, explore details of each workflow run in a repository through this table, including its status, conclusion, and other metadata. Utilize it to monitor and analyze the performance and results of your CI/CD workflows, ensuring your software development process is efficient and effective.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### List workflow runs
+Analyze the settings to understand the operations and status of the workflow runs in a specific GitHub repository. This can be beneficial in assessing the efficiency and effectiveness of workflows, identifying potential issues, and making informed decisions on workflow optimization.
+
+```sql+postgres
+select
+ *
+from
+ github_actions_repository_workflow_run
+where
+ repository_full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
*
from
@@ -18,8 +38,9 @@ where
```
### List failure workflow runs
+Identify instances where workflow runs have failed within the 'turbot/steampipe' repository. This can be useful for debugging and identifying problematic workflows.
-```sql
+```sql+postgres
select
id,
event,
@@ -36,9 +57,27 @@ where
repository_full_name = 'turbot/steampipe' and conclusion = 'failure';
```
+```sql+sqlite
+select
+ id,
+ event,
+ workflow_id,
+ conclusion,
+ status,
+ run_number,
+ workflow_url,
+ head_commit,
+ head_branch
+from
+ github_actions_repository_workflow_run
+where
+ repository_full_name = 'turbot/steampipe' and conclusion = 'failure';
+```
+
### List manual workflow runs
+This query helps you gain insights into the manually triggered workflow runs in the 'turbot/steampipe' repository. It's particularly useful for tracking and analyzing the performance and results of these workflow runs, allowing you to identify any potential issues or areas for improvement.
-```sql
+```sql+postgres
select
id,
event,
@@ -52,7 +91,26 @@ select
actor_login,
triggering_actor_login
from
- github_actions_repository_workflow_run
+ github_actions_repository_workflow_run
+where
+ repository_full_name = 'turbot/steampipe' and event = 'workflow_dispatch';
+```
+
+```sql+sqlite
+select
+ id,
+ event,
+ workflow_id,
+ conclusion,
+ status,
+ run_number,
+ workflow_url,
+ head_commit,
+ head_branch,
+ actor_login,
+ triggering_actor_login
+from
+ github_actions_repository_workflow_run
where
repository_full_name = 'turbot/steampipe' and event = 'workflow_dispatch';
```
\ No newline at end of file
diff --git a/docs/tables/github_audit_log.md b/docs/tables/github_audit_log.md
index c03c0f29..4f773157 100644
--- a/docs/tables/github_audit_log.md
+++ b/docs/tables/github_audit_log.md
@@ -1,12 +1,20 @@
-# Table: github_audit_log
+---
+title: "Steampipe Table: github_audit_log - Query GitHub Audit Logs using SQL"
+description: "Allows users to query GitHub Audit Logs, specifically the actions, users, and repositories involved, providing insights into user activity and potential security concerns."
+---
-The audit log lists events triggered by activities that affect your organization. Only owners can access an organization's audit log.
+# Table: github_audit_log - Query GitHub Audit Logs using SQL
-The `github_audit_log` table helps to find all audit events for an organization, and **you must always specify the organization** in the where or join clause (`where organization=`, `join github_audit_log on organization=`).
+GitHub Audit Logs is a feature within GitHub that allows you to keep track of what's happening in your organization, repositories, and teams. It provides a record of actions taken by users, whether they're adding new members, changing repository settings, or deleting branches. GitHub Audit Logs helps you stay informed about the activities within your GitHub resources and take appropriate actions when needed.
-**Note**: This table only works for organizations on an [GitHub Enterprise plan](https://docs.github.com/en/enterprise-cloud@latest/admin/overview/about-enterprise-accounts).
+## Table Usage Guide
-This table supports optional quals. Queries with optional quals are optimised to use GitHub query filters. Optional quals are supported for the following columns:
+The `github_audit_log` table provides insights into user activity within GitHub. As a Security Analyst, explore user-specific actions through this table, including performed actions, involved repositories, and action timestamps. Utilize it to uncover information about user actions, such as repository changes, team membership alterations, and other potential security risks.
+
+**Important Notes**
+- You must specify the `organization` column in `where` or `join` clause to query the table.
+- This table only works for organizations on an [GitHub Enterprise plan](https://docs.github.com/en/enterprise-cloud@latest/admin/overview/about-enterprise-accounts).
+- This table supports optional quals. Queries with optional quals are optimised to use GitHub query filters. Optional quals are supported for the following columns:
- `action`
- `actor`
- `created_at`
@@ -17,8 +25,25 @@ This table supports optional quals. Queries with optional quals are optimised to
## Examples
### List recent audit events for an organization
+Explore the recent audit activities within your organization to gain insights into actions taken and by whom, which can aid in understanding behavioral patterns and identifying potential security issues.
+
+```sql+postgres
+select
+ id,
+ created_at,
+ actor,
+ action,
+ data
+from
+ github_audit_log
+where
+ organization = 'my_org'
+order by
+ created_at
+limit 10;
+```
-```sql
+```sql+sqlite
select
id,
created_at,
@@ -35,8 +60,9 @@ limit 10;
```
### List audit events in a specific date range
+Explore which audit events occurred within your organization over a specific date range. This can help you understand the activity and changes made during that period, allowing for better tracking and management.
-```sql
+```sql+postgres
select
id,
created_at,
@@ -49,12 +75,46 @@ where
organization = 'my_org'
and created_at between '2022-06-27' and '2022-06-29'
order by
- created_at
+ created_at;
+```
+
+```sql+sqlite
+select
+ id,
+ created_at,
+ actor,
+ action,
+ data
+from
+ github_audit_log
+where
+ organization = 'my_org'
+ and created_at between '2022-06-27' and '2022-06-29'
+order by
+ created_at;
```
### List repository creation and deletion audit events on a specific date
+Explore which repository creation and deletion events occurred on a specific date within your organization. This is useful for tracking changes and maintaining a record of repository actions for potential audit or review purposes.
-```sql
+```sql+postgres
+select
+ id,
+ created_at,
+ actor,
+ action,
+ data
+from
+ github_audit_log
+where
+ organization = 'my_org'
+ and action IN ('repo.create', 'repo.destroy')
+ and created_at = '2022-01-01'
+order by
+ created_at;
+```
+
+```sql+sqlite
select
id,
created_at,
@@ -72,8 +132,9 @@ order by
```
### List audit events by a specific actor (user) in the last 30 days
+This query is useful for tracking the activities of a particular user within your organization on Github over the past month. It helps in monitoring user behavior, identifying any unusual actions, and maintaining a safe and secure environment.
-```sql
+```sql+postgres
select
id,
created_at,
@@ -90,9 +151,27 @@ order by
created_at;
```
+```sql+sqlite
+select
+ id,
+ created_at,
+ actor,
+ action,
+ data
+from
+ github_audit_log
+where
+ organization = 'my_org'
+ and actor = 'some_user'
+ and created_at > datetime('now', '-30 day')
+order by
+ created_at;
+```
+
### List branch protection override audit events on a specific date using a search phrase
+Gain insights into the audit events that occurred on a specific date, particularly those related to branch protection overrides. This is useful for organizations that want to monitor and assess potential security risks or policy violations within their GitHub repositories.
-```sql
+```sql+postgres
select
id,
created_at,
@@ -107,3 +186,19 @@ where
order by
created_at;
```
+
+```sql+sqlite
+select
+ id,
+ created_at,
+ actor,
+ action,
+ data
+from
+ github_audit_log
+where
+ organization = 'my_org'
+ and phrase = 'action:protected_branch.policy_override created:2022-06-28'
+order by
+ created_at;
+```
\ No newline at end of file
diff --git a/docs/tables/github_branch.md b/docs/tables/github_branch.md
index 46c2f2c6..94405e96 100644
--- a/docs/tables/github_branch.md
+++ b/docs/tables/github_branch.md
@@ -1,14 +1,25 @@
-# Table: github_branch
+---
+title: "Steampipe Table: github_branch - Query GitHub Branches using SQL"
+description: "Allows users to query GitHub Branches, specifically the details of branches for a repository, providing insights into branch information such as name, commit, protected status, and more."
+---
-A branch is essentially is a unique set of code changes with a unique name.
+# Table: github_branch - Query GitHub Branches using SQL
-The `github_branch` table can be used to query information about any branch, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Branches are references within a repository that point to the state of a project at a specific point in time. They represent an isolated line of development and can be created, deleted, and manipulated without affecting the rest of the project. Branches are a crucial part of the GitHub workflow, enabling collaboration and iteration on different features or fixes.
+
+## Table Usage Guide
+
+The `github_branch` table provides insights into branches within GitHub repositories. As a developer or project manager, explore branch-specific details through this table, including name, commit, protected status, and associated metadata. Utilize it to uncover information about branches, such as those with protected status, the commit associated with each branch, and the verification of branch protections.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### List branches
+Discover the segments that represent specific branches of a GitHub repository, including their protection status and associated commit details. This is particularly useful for understanding the structure and security measures of a project.
-```sql
+```sql+postgres
select
name,
commit ->> 'sha' as commit_sha,
@@ -19,9 +30,21 @@ where
repository_full_name = 'turbot/steampipe';
```
+```sql+sqlite
+select
+ name,
+ json_extract(commit, '$.sha') as commit_sha,
+ protected
+from
+ github_branch
+where
+ repository_full_name = 'turbot/steampipe';
+```
+
### List commit details for each branch
+Discover the specifics of each commit made in different branches of a particular GitHub repository. This allows you to track changes, observe trends, and analyze the contribution of different authors over time.
-```sql
+```sql+postgres
select
name,
commit ->> 'sha' as commit_sha,
@@ -40,9 +63,29 @@ where
repository_full_name = 'turbot/steampipe';
```
+```sql+sqlite
+select
+ name,
+ json_extract("commit", '$.sha') as commit_sha,
+ json_extract("commit", '$.message') as commit_message,
+ json_extract("commit", '$.url') as commit_url,
+ json_extract(json_extract("commit", '$.author'), '$.user.login') as author,
+ json_extract("commit", '$.authored_date') as authored_date,
+ json_extract(json_extract("commit", '$.committer'), '$.user.login') as committer,
+ json_extract("commit", '$.committed_date') as committed_date,
+ json_extract("commit", '$.additions') as additions,
+ json_extract("commit", '$.deletions') as deletions,
+ json_extract("commit", '$.changed_files') as changed_files
+from
+ github_branch
+where
+ repository_full_name = 'turbot/steampipe';
+```
+
### List branch protection information for each protected branch
+Gain insights into the protection rules applied to each safeguarded branch within a specific GitHub repository. This can help ensure the repository's integrity by understanding the restrictions and permissions set for each branch.
-```sql
+```sql+postgres
select
name,
protected,
@@ -56,7 +99,26 @@ select
from
github_branch
where
- repository_full_name = 'turbot/steampipe';
+ repository_full_name = 'turbot/steampipe'
and
protected = true;
```
+
+```sql+sqlite
+select
+ name,
+ protected,
+ json_extract(branch_protection_rule, '$.id') as rule_id,
+ json_extract(branch_protection_rule, '$.node_id') as rule_node_id,
+ json_extract(branch_protection_rule, '$.allows_deletions') as allows_deletions,
+ json_extract(branch_protection_rule, '$.allows_force_pushes') as allows_force_pushes,
+ json_extract(branch_protection_rule, '$.creator_login') as rule_creator,
+ json_extract(branch_protection_rule, '$.requires_commit_signatures') as requires_signatures,
+ json_extract(branch_protection_rule, '$.restricts_pushes') as restricts_pushes
+from
+ github_branch
+where
+ repository_full_name = 'turbot/steampipe'
+and
+ protected = 1;
+```
\ No newline at end of file
diff --git a/docs/tables/github_branch_protection.md b/docs/tables/github_branch_protection.md
index 4647f240..176fd12d 100644
--- a/docs/tables/github_branch_protection.md
+++ b/docs/tables/github_branch_protection.md
@@ -1,16 +1,34 @@
-# Table: github_branch_protection
+---
+title: "Steampipe Table: github_branch_protection - Query GitHub Branch Protections using SQL"
+description: "Allows users to query GitHub Branch Protections, specifically the protection rules applied to branches in a GitHub repository."
+---
-Branch protection is a set of rules protecting the branch from inappropriate changes.
+# Table: github_branch_protection - Query GitHub Branch Protections using SQL
-The `github_branch_protection` table can be used to query information about any branch, and **you must specify which repository (or node_id for a single item)** in the where or join clause using the `repository_full_name` column.
+GitHub Branch Protection is a feature within GitHub that allows you to define certain rules for branches, particularly those that are part of the project's deployment process. These rules can include required status checks, required pull request reviews, and restrictions on who can push to the branch. Branch Protection helps maintain code integrity by enforcing workflow policies and preventing force pushes and accidental deletions.
-GitHub users with admin permissions to a repository can manage branch protection rules.
+## Table Usage Guide
+
+The `github_branch_protection` table provides insights into branch protection rules within GitHub. As a DevOps engineer or a repository manager, explore branch-specific details through this table, including the enforcement of status checks, pull request reviews, and push restrictions. Utilize it to uncover information about branch protections, such as those with strict requirements, the enforcement of signed commits, and the restrictions on who can push to the branch.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### List all branch protection rules for a repository
+Explore the safety measures applied to a specific repository to understand its level of protection against unauthorized changes.
+
+```sql+postgres
+select
+ *
+from
+ github_branch_protection
+where
+ repository_full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
*
from
@@ -20,8 +38,34 @@ where
```
### Get a single branch protection rule by node id
+Explore the specific rules and restrictions applied to a particular branch in a GitHub repository. This can be useful for understanding how different branches are managed and protected, and to ensure compliance with best practices for code review and collaboration.
+
+```sql+postgres
+select
+ node_id,
+ matching_branches,
+ is_admin_enforced,
+ allows_deletions,
+ allows_force_pushes,
+ blocks_creations,
+ creator_login,
+ dismisses_stale_reviews,
+ lock_allows_fetch_and_merge,
+ lock_branch,
+ require_last_push_approval,
+ requires_approving_reviews,
+ requires_commit_signatures,
+ restricts_pushes,
+ push_allowance_apps,
+ push_allowance_apps,
+ push_allowance_users
+from
+ github_branch_protection
+where
+ node_id = 'BPR_xxXXXX0X0X0XXXX0';
+```
-```sql
+```sql+sqlite
select
node_id,
matching_branches,
@@ -47,8 +91,20 @@ where
```
### List branch protection rules which are not currently utilised
+Determine the areas in which branch protection rules are not being used within the 'turbot/steampipe' repository. This can help in identifying unused rules and optimizing the repository's security configuration.
-```sql
+```sql+postgres
+select
+ *
+from
+ github_branch_protection
+where
+ repository_full_name = 'turbot/steampipe'
+and
+ matching_branches = 0;
+```
+
+```sql+sqlite
select
*
from
@@ -60,8 +116,9 @@ and
```
### Get repositories that require signed commits for merging
+Explore which branches in the 'turbot/steampipe' repository have a policy requiring signed commits for merging. This can help maintain code integrity by ensuring only verified changes are merged.
-```sql
+```sql+postgres
select
repository_full_name,
pattern,
@@ -73,3 +130,16 @@ where
and
requires_commit_signatures = true;
```
+
+```sql+sqlite
+select
+ repository_full_name,
+ pattern,
+ matching_branches
+from
+ github_branch_protection
+where
+ repository_full_name = 'turbot/steampipe'
+and
+ requires_commit_signatures = 1;
+```
\ No newline at end of file
diff --git a/docs/tables/github_code_owner.md b/docs/tables/github_code_owner.md
index 3df4aa96..4a0b8882 100644
--- a/docs/tables/github_code_owner.md
+++ b/docs/tables/github_code_owner.md
@@ -1,13 +1,23 @@
-# Table: github_code_owner
+---
+title: "Steampipe Table: github_code_owner - Query GitHub Code Owners using SQL"
+description: "Allows users to query GitHub Code Owners, providing insights into the users or teams that own certain code in a repository."
+---
-All of your code owners rules defined in your repository, in CODEOWNERS files.
+# Table: github_code_owner - Query GitHub Code Owners using SQL
-The `github_code_owner` table can be used to query information about **ANY** repository, and **you must specify which repository** in the where or join clause (`where repository_full_name=`, `join github_code_owner on repository_full_name=`).
+GitHub Code Owners is a feature within GitHub that allows repository administrators to define specific maintainers for different parts of a codebase. It works by assigning a 'code owner' to specific files or directories in a repository, and these owners are then automatically requested for review when someone opens a pull request that modifies code they own. This feature helps streamline the code review process and ensures that the right people are involved in reviewing changes.
+
+## Table Usage Guide
+
+The `github_code_owner` table provides insights into the code owners within a GitHub repository. As a repository administrator, you can use this table to understand who owns which parts of your codebase and to ensure that all changes are reviewed by the appropriate individuals. This table can also be helpful for developers looking to understand who to contact for specific parts of a codebase, or for project managers looking to understand the distribution of code ownership within a project.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### List code owners from rules
-
+Determine the ownership of different sections of code within the 'github/docs' repository. This can help identify who is responsible for certain code patterns, allowing for more efficient collaboration and issue resolution.
For instance, for a given [CODEOWNERS](https://github.com/github/docs/blob/main/.github/CODEOWNERS) file from the [GitHub Docs](https://github.com/github/docs) repository:
```
@@ -49,7 +59,24 @@ content/actions/deployment/security-hardening-your-deployments/** @github/oidc
You can query all of the rules with the following query:
-```sql
+```sql+postgres
+select
+ line,
+ pattern,
+ users,
+ teams,
+ pre_comments,
+ line_comment,
+ repository_full_name
+from
+ github_code_owner
+where
+ repository_full_name = 'github/docs'
+order by
+ line asc;
+```
+
+```sql+sqlite
select
line,
pattern,
@@ -91,4 +118,4 @@ order by
| 31 | /contributing/content-templates.md | | ["@github/docs-content-strategy"] | ["# Content strategy"] | | github/docs |
| 34 | content/actions/deployment/security-hardening-your-deployments/** | | ["@github/oidc"] | ["# Requires review of #actions-oidc-integration, docs-engineering/issues/1506"] | | github/docs |
+------+-------------------------------------------------------------------+-----------------+-----------------------------------+----------------------------------------------------------------------------------+--------------+----------------------+
-```
+```
\ No newline at end of file
diff --git a/docs/tables/github_commit.md b/docs/tables/github_commit.md
index f7e449de..bad03382 100644
--- a/docs/tables/github_commit.md
+++ b/docs/tables/github_commit.md
@@ -1,14 +1,39 @@
-# Table: github_commit
+---
+title: "Steampipe Table: github_commit - Query GitHub Commits using SQL"
+description: "Allows users to query GitHub Commits, specifically the details of individual commits made in a repository, providing insights into code changes and development patterns."
+---
-Commits for a repository.
+# Table: github_commit - Query GitHub Commits using SQL
-The `github_commit` table can be used to query information about any commit, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Commits are an integral part of the GitHub service, which provides a collaborative platform for software development. Each commit represents a single point in the git history, storing the changes made to the codebase along with metadata such as the author, timestamp, and associated comments. Commits serve as a record of what changes were made, when, and by whom, providing a comprehensive history of a project's development.
+
+## Table Usage Guide
+
+The `github_commit` table provides insights into individual commits within a GitHub repository. As a developer or project manager, explore commit-specific details through this table, including author information, commit messages, and timestamps. Utilize it to understand the development history, track code changes, and analyze development patterns within your projects.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### Recent commits
+Explore the latest updates made to a specific GitHub repository. This allows you to track changes and progress over time, providing valuable insights into the development process.
+
+```sql+postgres
+select
+ sha,
+ author_login,
+ authored_date,
+ message
+from
+ github_commit
+where
+ repository_full_name = 'turbot/steampipe'
+order by
+ authored_date desc;
+```
-```sql
+```sql+sqlite
select
sha,
author_login,
@@ -23,8 +48,23 @@ order by
```
### Commits by a given author
+Explore which contributions have been made by a specific user to a particular GitHub repository, sorted by most recent. This can be useful for tracking individual productivity or reviewing the history of changes made by a particular developer.
-```sql
+```sql+postgres
+select
+ sha,
+ authored_date,
+ message
+from
+ github_commit
+where
+ repository_full_name = 'turbot/steampipe'
+ and author_login = 'e-gineer'
+order by
+ authored_date desc;
+```
+
+```sql+sqlite
select
sha,
authored_date,
@@ -39,8 +79,9 @@ order by
```
### Contributions by author
+Discover the segments that feature the most activity by tracking the frequency of contributions from individual authors in a specific GitHub repository. This is useful for understanding who are the most active contributors in a project.
-```sql
+```sql+postgres
select
author_login,
count(*)
@@ -54,9 +95,39 @@ order by
count desc;
```
+```sql+sqlite
+select
+ author_login,
+ count(*)
+from
+ github_commit
+where
+ repository_full_name = 'turbot/steampipe'
+group by
+ author_login
+order by
+ count(*) desc;
+```
+
### Commits that were not verified
+Discover the segments that include unverified commits in the Steampipe repository. This can be particularly useful for tracking and improving security by identifying potentially malicious or unauthorised changes to the codebase.
+
+```sql+postgres
+select
+ sha,
+ author_login,
+ authored_date
+from
+ github_commit
+where
+ repository_full_name = 'turbot/steampipe'
+and
+ signature is null
+order by
+ authored_date desc;
+```
-```sql
+```sql+sqlite
select
sha,
author_login,
@@ -72,8 +143,9 @@ order by
```
### Commits with most file changes
+Explore which commits have resulted in the most file changes within a specific GitHub repository. This can help identify instances where significant modifications have been made, providing insights into the evolution and maintenance of the project.
-```sql
+```sql+postgres
select
sha,
message,
@@ -88,3 +160,19 @@ where
order by
changed_files desc;
```
+
+```sql+sqlite
+select
+ sha,
+ message,
+ author_login,
+ changed_files,
+ additions,
+ deletions
+from
+ github_commit
+where
+ repository_full_name = 'turbot/steampipe'
+order by
+ changed_files desc;
+```
\ No newline at end of file
diff --git a/docs/tables/github_community_profile.md b/docs/tables/github_community_profile.md
index 33115e0b..a7166c8f 100644
--- a/docs/tables/github_community_profile.md
+++ b/docs/tables/github_community_profile.md
@@ -1,17 +1,34 @@
-# Table: github_community_profile
+---
+title: "Steampipe Table: github_community_profile - Query Github Community Profiles using SQL"
+description: "Allows users to query Github Community Profiles, providing insights into the health and community activity of repositories."
+---
-Community profile measures and information (e.g. README location) for a public repository.
+# Table: github_community_profile - Query Github Community Profiles using SQL
-Note:
+A Github Community Profile is a measure of the health and community activity of a repository. It includes factors such as the presence of a code of conduct, contributing guidelines, and issue and pull request templates. A healthy community profile indicates a well-maintained, welcoming, and sustainable open-source project.
-- A `repository_full_name` must be provided in all queries to this table.
-- Community profile data is only available for public GitHub repositories.
+## Table Usage Guide
+
+The `github_community_profile` table provides insights into the health and community activity of Github repositories. As a repository owner or contributor, explore details through this table, including the presence of contributing guidelines, code of conduct, and issue templates. Utilize it to evaluate the health of repositories, understand their community engagement, and identify areas for improvement.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### Get community profile information for the repository
+Explore the community profile details for a specific repository to gain insights into the repository's health and activity. This is useful for assessing the repository's contribution guidelines, code of conduct, and other community-related aspects.
+
+```sql+postgres
+select
+ *
+from
+ github_community_profile
+where
+ repository_full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
*
from
@@ -21,13 +38,24 @@ where
```
### List repositories having the security file
+This example helps identify the GitHub repositories that have a security file in place. This is useful for understanding the security measures implemented in each repository, which is crucial for maintaining project integrity and preventing unauthorized access.
-```sql
-select
- repository_full_name,
+```sql+postgres
+select
+ repository_full_name,
security ->> 'text' as security_file_content
from
- github_community_profile c
- join github_my_repository r on r.full_name = c.repository_full_name
+ github_community_profile c
+ join github_my_repository r on r.name_with_owner = c.repository_full_name
+ where security is not null;
+```
+
+```sql+sqlite
+select
+ repository_full_name,
+ json_extract(security, '$.text') as security_file_content
+from
+ github_community_profile c
+ join github_my_repository r on r.name_with_owner = c.repository_full_name
where security is not null;
```
\ No newline at end of file
diff --git a/docs/tables/github_gist.md b/docs/tables/github_gist.md
index 79fd4007..b8738bed 100644
--- a/docs/tables/github_gist.md
+++ b/docs/tables/github_gist.md
@@ -1,14 +1,34 @@
-# Table: github_gist
+---
+title: "Steampipe Table: github_gist - Query GitHub Gists using SQL"
+description: "Allows users to query GitHub Gists, specifically retrieving details such as gist id, description, comments, files, forks, history, owner, and public status."
+---
-GitHub Gist is a simple way to share snippets and pastes with others. You can query **ANY** gist that you have access to by specifying its `id` explicitly in the where clause with `where id =`. You must specify the `id` in a where clause or join key to use this table.
+# Table: github_gist - Query GitHub Gists using SQL
-To list the gists that **you own**, use the `github_my_gist` table.
+GitHub Gists are a simple way to share snippets and pastes with others. Gists are version controlled, forkable, and embeddable, making them an ideal tool for sharing and discussing code. They can be public or secret, and can be associated with a specific GitHub user or anonymous.
+
+## Table Usage Guide
+
+The `github_gist` table provides insights into Gists within GitHub. As a developer or team lead, explore Gist-specific details through this table, including its description, comments, files, forks, history, owner, and public status. Utilize it to uncover information about Gists, such as their version history, fork details, and associated comments.
+
+**Important Notes**
+- You must specify the `id` column in `where` or `join` clause to query the table.
## Examples
### Get details about ANY public gist (by id)
+Explore the specifics of a publicly shared code snippet on Github by providing its unique ID. This is useful to understand the content and context of the code snippet without having to navigate through the Github platform.
+
+```sql+postgres
+select
+ *
+from
+ github_gist
+where
+ id='633175';
+```
-```sql
+```sql+sqlite
select
*
from
@@ -18,8 +38,9 @@ where
```
### Get file details about ANY public gist (by id)
+Explore the contents of any public 'gist' on GitHub by specifying its unique ID. This can be useful for understanding the content and structure of shared code snippets without having to navigate to the GitHub site.
-```sql
+```sql+postgres
select
id,
jsonb_pretty(files)
@@ -28,3 +49,13 @@ from
where
id = 'e85a3d8e7a23c247f672aaf95b6c3da9';
```
+
+```sql+sqlite
+select
+ id,
+ files
+from
+ github_gist
+where
+ id = 'e85a3d8e7a23c247f672aaf95b6c3da9';
+```
\ No newline at end of file
diff --git a/docs/tables/github_gitignore.md b/docs/tables/github_gitignore.md
index 30b9ce55..c1cb5b05 100644
--- a/docs/tables/github_gitignore.md
+++ b/docs/tables/github_gitignore.md
@@ -1,12 +1,31 @@
-# Table: github_gitignore
+---
+title: "Steampipe Table: github_gitignore - Query GitHub Gitignore using SQL"
+description: "Allows users to query GitHub Gitignore templates, providing a list of all templates available for use on GitHub."
+---
-GitHub allows you to associate a gitignore with your repository. The `github_gitignore` table lists information about the available gitignore templates.
+# Table: github_gitignore - Query GitHub Gitignore using SQL
+
+GitHub Gitignore is a feature that specifies intentionally untracked files to ignore when using Git. These are typically files that are generated during the build process or at runtime, and are not part of the source code repository. GitHub provides a list of templates for different programming languages and environments, which can be used to generate a `.gitignore` file for a new project.
+
+## Table Usage Guide
+
+The `github_gitignore` table provides insights into Gitignore templates available on GitHub. As a developer or a DevOps engineer, explore template-specific details through this table, including the name of the template and its source. Utilize it to discover available templates, understand their structure, and decide which one to use for your project.
## Examples
### List basic gitignore info
+Explore the various types of gitignore files in your GitHub repositories, in an organized manner. This will help you understand the different ignore rules applied across your projects, promoting better code management.
+
+```sql+postgres
+select
+ *
+from
+ github_gitignore
+order by
+ name;
+```
-```sql
+```sql+sqlite
select
*
from
@@ -16,8 +35,9 @@ order by
```
### View the source of the Go template
+Uncover the details of the original Go template from GitHub. This query can help developers understand the foundation of Go programming language templates, providing a starting point for potential customization or improvement.
-```sql
+```sql+postgres
select
source
from
@@ -25,3 +45,12 @@ from
where
name = 'Go';
```
+
+```sql+sqlite
+select
+ source
+from
+ github_gitignore
+where
+ name = 'Go';
+```
\ No newline at end of file
diff --git a/docs/tables/github_issue.md b/docs/tables/github_issue.md
index 17df55a8..abbe8c1b 100644
--- a/docs/tables/github_issue.md
+++ b/docs/tables/github_issue.md
@@ -1,16 +1,40 @@
-# Table: github_issue
+---
+title: "Steampipe Table: github_issue - Query GitHub Issues using SQL"
+description: "Allows users to query GitHub Issues, providing insights into open, closed, and in-progress issues across repositories."
+---
-GitHub Issues are used to track ideas, enhancements, tasks, or bugs for work on GitHub.
+# Table: github_issue - Query GitHub Issues using SQL
-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.
+GitHub Issues is a feature within GitHub that allows users to track bugs, enhancements, or other requests. It provides a platform for users to collaborate on problems, discuss complex details, and manage updates on ongoing issues. GitHub Issues helps in tracking individual tasks within a project, linking tasks to each other, and organizing tasks into manageable units.
-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.
+## Table Usage Guide
+
+The `github_issue` table provides insights into issues within GitHub repositories. As a project manager or developer, explore issue-specific details through this table, including status, assignees, labels, and associated metadata. Utilize it to uncover information about issues, such as those that are overdue, the collaboration between team members on certain issues, and the overall progress of issues within a project.
+
+**Important Notes**
+- You must specify the `repository_full_name` (owner/repository) column in `where` or `join` clause to query the table.
+- The 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
+Explore the status and assignment of issues within a specific GitHub repository to better manage project tasks and responsibilities. This can help in tracking task progress and identifying bottlenecks in the project workflow.
+
+```sql+postgres
+select
+ repository_full_name,
+ number,
+ title,
+ state,
+ author_login,
+ assignees_total_count
+from
+ github_issue
+where
+ repository_full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
repository_full_name,
number,
@@ -25,8 +49,9 @@ where
```
### List the unassigned open issues in a repository
+Identify instances where there are open issues in a specific repository that have not been assigned to anyone. This is useful to ensure all issues are being addressed and no task is left unattended.
-```sql
+```sql+postgres
select
repository_full_name,
number,
@@ -38,16 +63,48 @@ from
github_issue
where
repository_full_name = 'turbot/steampipe'
-and
+and
assignees_total_count = 0
-and
+and
state = 'OPEN';
+```
+```sql+sqlite
+select
+ repository_full_name,
+ number,
+ title,
+ state,
+ author_login,
+ assignees_total_count
+from
+ github_issue
+where
+ repository_full_name = 'turbot/steampipe'
+and
+ assignees_total_count = 0
+and
+ state = 'OPEN';
```
### Report of the number issues in a repository by author
+Determine the areas in which specific authors are contributing to the number of issues in a particular project, in this case, 'turbot/steampipe'. This can be useful for understanding individual contributions and identifying key contributors or problematic areas based on the number of issues raised by each author.
-```sql
+```sql+postgres
+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;
+```
+
+```sql+sqlite
select
author_login,
count(*) as num_issues
@@ -62,8 +119,9 @@ order by
```
### Join with github_my_repository to find open issues in multiple repos that you own or contribute to
+Discover the open issues across multiple repositories that you own or contribute to, particularly those related to 'turbot/steampipe'. This can help manage and prioritize your workflow by providing a clear overview of outstanding tasks.
-```sql
+```sql+postgres
select
i.repository_full_name,
i.number,
@@ -71,15 +129,30 @@ select
from
github_my_repository as r,
github_issue as i
-where
- r.full_name like 'turbot/steampip%'
+where
+ r.name_with_owner like 'turbot/steampip%'
and i.state = 'OPEN'
- and i.repository_full_name = r.full_name;
+ and i.repository_full_name = r.name_with_owner;
+```
+
+```sql+sqlite
+select
+ i.repository_full_name,
+ i.number,
+ i.title
+from
+ github_my_repository as r,
+ github_issue as i
+where
+ r.name_with_owner like 'turbot/steampip%'
+ and i.state = 'OPEN'
+ and i.repository_full_name = r.name_with_owner;
```
### List all issues with labels as a string array (instead of JSON objects)
+Explore which issues on the 'turbot/steampipe' repository have been tagged with specific labels. This can help in identifying trends or patterns in issue categorization, aiding in more efficient issue management and resolution.
-```sql
+```sql+postgres
select
repository_full_name,
number,
@@ -94,9 +167,24 @@ group by
repository_full_name, number, title;
```
+```sql+sqlite
+select
+ repository_full_name,
+ number,
+ title,
+ json_group_array(t.value) as labels
+from
+ github_issue i,
+ json_each(i.labels) as t
+where
+ repository_full_name = 'turbot/steampipe'
+group by
+ repository_full_name, number, title;
+```
+
OR
-```sql
+```sql+postgres
select
i.repository_full_name,
i.number,
@@ -111,9 +199,25 @@ group by
i.repository_full_name, i.number, i.title;
```
+```sql+sqlite
+select
+ i.repository_full_name,
+ i.number,
+ i.title,
+ json_group_array(json_extract(l.value, '$.name')) as labels
+from
+ github_issue i,
+ json_each(i.labels_src) as l
+where
+ repository_full_name = 'turbot/steampipe'
+group by
+ i.repository_full_name, i.number, i.title;
+```
+
### List all open issues in a repository with a specific label
+This query is useful for identifying open issues tagged with a specific label within a designated repository. This can help in prioritizing bug fixes and managing project workflows effectively.
-```sql
+```sql+postgres
select
repository_full_name,
number,
@@ -130,4 +234,20 @@ and
labels ? 'bug'
group by
repository_full_name, number, title;
+```
+
+```sql+sqlite
+select
+ repository_full_name,
+ number,
+ title,
+ (select json_group_array(labels.value) FROM json_each(i.labels) as labels) as labels
+from
+ github_issue i
+where
+ repository_full_name = 'turbot/steampipe'
+ and state = 'OPEN'
+ and json_extract(i.labels, '$.bug') is not null
+group by
+ repository_full_name, number, title;
```
\ No newline at end of file
diff --git a/docs/tables/github_issue_comment.md b/docs/tables/github_issue_comment.md
index ddb9cc79..80ae0f1f 100644
--- a/docs/tables/github_issue_comment.md
+++ b/docs/tables/github_issue_comment.md
@@ -1,14 +1,45 @@
-# Table: github_issue_comment
+---
+title: "Steampipe Table: github_issue_comment - Query GitHub Issue Comments using SQL"
+description: "Allows users to query GitHub Issue Comments, specifically the details of comments made on issues across all repositories, providing insights into user interactions and feedback."
+---
-The `github_issue_comment` table can be used to query comments from a specific issue.
+# Table: github_issue_comment - Query GitHub Issue Comments using SQL
-**You must specify `repository_full_name` (repository including org/user prefix) and `number` (of the issue) in the WHERE or JOIN clause.**
+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 in `where` or `join` 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.
-```sql
+```sql+postgres
+select
+ id,
+ author_login,
+ author_association,
+ body_text,
+ created_at,
+ updated_at,
+ published_at,
+ last_edited_at,
+ editor_login,
+ url
+from
+ github_issue_comment
+where
+ repository_full_name = 'turbot/steampipe-plugin-github'
+and
+ number = 201;
+```
+
+```sql+sqlite
select
id,
author_login,
@@ -29,8 +60,28 @@ and
```
### 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.
-```sql
+```sql+postgres
+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.url
+from
+ github_issue_comment c
+join
+ github_my_issue i
+on
+ i.repository_full_name = c.repository_full_name
+and
+ i.number = c.number;
+```
+
+```sql+sqlite
select
c.repository_full_name,
c.number as issue,
@@ -50,8 +101,9 @@ and
```
### 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.
-```sql
+```sql+postgres
select
id,
number as issue,
@@ -68,4 +120,23 @@ and
number = 201
and
body_text ~~* '%branch%';
+```
+
+```sql+sqlite
+select
+ id,
+ number as issue,
+ author_login as comment_author,
+ author_association,
+ body_text as content,
+ created_at,
+ url
+from
+ github_issue_comment
+where
+ repository_full_name = 'turbot/steampipe-plugin-github'
+and
+ number = 201
+and
+ body_text like '%branch%';
```
\ No newline at end of file
diff --git a/docs/tables/github_license.md b/docs/tables/github_license.md
index b4c24473..12e6911b 100644
--- a/docs/tables/github_license.md
+++ b/docs/tables/github_license.md
@@ -1,12 +1,31 @@
-# Table: github_license
+---
+title: "Steampipe Table: github_license - Query GitHub Licenses using SQL"
+description: "Allows users to query GitHub Licenses, specifically providing detailed information about the various open-source licenses used across GitHub repositories."
+---
-GitHub allows you to associate a license with your repository. The `github_license` table lists information about the available licenses.
+# Table: github_license - Query GitHub Licenses using SQL
+
+GitHub Licenses are a set of permissions that developers grant to others to study, distribute, and modify their software. These licenses allow the software to be freely used, modified, and shared. They are crucial to the open-source community as they ensure the software remains open-source, even after modifications.
+
+## Table Usage Guide
+
+The `github_license` table provides insights into the different licenses used across GitHub repositories. As a software developer or open-source enthusiast, you can explore the specifics of these licenses through this table, including their permissions, conditions, and limitations. Use it to understand the terms under which you can use, modify, or distribute the software in question.
## Examples
### List basic license info
+Explore the fundamental details of licensing in your GitHub repositories. This can help you ensure compliance with open source licensing requirements and understand the permissions associated with different licenses.
+
+```sql+postgres
+select
+ spdx_id,
+ name,
+ description
+from
+ github_license;
+```
-```sql
+```sql+sqlite
select
spdx_id,
name,
@@ -16,8 +35,9 @@ from
```
### View license permissions
+Explore the specific permissions associated with different licenses on GitHub. This helps in understanding the rights granted by each license, assisting users in making an informed choice when selecting a license for their project.
-```sql
+```sql+postgres
select
name,
jsonb_pretty(permissions)
@@ -25,15 +45,49 @@ from
github_license;
```
+```sql+sqlite
+select
+ name,
+ permissions
+from
+ github_license;
+```
+
### Count your repositories by license
+Determine the number of your repositories grouped by their respective licenses. This is useful for understanding the distribution of license usage across your repositories.
-```sql
+```sql+postgres
+with license_key as (
+ select
+ license_info ->> 'key' as key
+ from
+ github_my_repository
+)
select
l.name,
- count(r.license_key) as num_repos
+ count(k.key) as num_repos
from
github_license as l
- left join github_my_repository as r on l.key = r.license_key
+ left join license_key as k on l.key = k.key
+group by
+ l.name
+order by
+ num_repos desc;
+```
+
+```sql+sqlite
+with license_key as (
+ select
+ license_info ->> 'key' as key
+ from
+ github_my_repository
+)
+select
+ l.name,
+ count(k.key) as num_repos
+from
+ github_license as l
+ left join license_key as k on l.key = k.key
group by
l.name
order by
@@ -41,8 +95,9 @@ order by
```
### View conditions for a specific license
+Explore the specific conditions and their descriptions associated with a particular license on GitHub. This is particularly useful for understanding the terms of use and restrictions tied to a license before integrating it into your project.
-```sql
+```sql+postgres
select
name,
key,
@@ -55,9 +110,23 @@ where
key = 'gpl-3.0';
```
+```sql+sqlite
+select
+ name,
+ l.key,
+ json_extract(c.value, '$.Key') as condition,
+ json_extract(c.value, '$.Description') as condition_desc
+from
+ github_license as l,
+ json_each(conditions) as c
+where
+ l.key = 'gpl-3.0';
+```
+
### View limitations for a specific license
+Determine the restrictions associated with a specific software license, such as the 'gpl-3.0'. This is useful for understanding the terms and conditions that govern the use of the licensed software.
-```sql
+```sql+postgres
select
name,
key,
@@ -70,9 +139,23 @@ where
key = 'gpl-3.0';
```
+```sql+sqlite
+select
+ name,
+ g.key,
+ json_extract(l.value, '$.Key') as limitation,
+ json_extract(l.value, '$.Description') as limitation_desc
+from
+ github_license as g,
+ json_each(limitations) as l
+where
+ g.key = 'gpl-3.0';
+```
+
### View permissions for a specific license
+Explore the specific permissions associated with a particular software license. This can be useful when understanding the scope and limitations of a license before using or distributing software under its terms.
-```sql
+```sql+postgres
select
name,
key,
@@ -83,4 +166,17 @@ from
jsonb_array_elements(permissions) as p
where
key = 'gpl-3.0';
+```
+
+```sql+sqlite
+select
+ name,
+ l.key,
+ json_extract(p.value, '$.Key') as permission,
+ json_extract(p.value, '$.Description') as permission_desc
+from
+ github_license as l,
+ json_each(permissions) as p
+where
+ l.key = 'gpl-3.0';
```
\ No newline at end of file
diff --git a/docs/tables/github_my_gist.md b/docs/tables/github_my_gist.md
index e28b10d7..3de744c8 100644
--- a/docs/tables/github_my_gist.md
+++ b/docs/tables/github_my_gist.md
@@ -1,14 +1,32 @@
-# Table: github_my_gist
+---
+title: "Steampipe Table: github_my_gist - Query GitHub Gists using SQL"
+description: "Allows users to query GitHub Gists, specifically those owned by the authenticated user, providing insights into the user's Gist details."
+---
-GitHub Gist is a simple way to share snippets and pastes with others. The `github_my_gist` table will list only gists that **you own**.
+# Table: github_my_gist - Query GitHub Gists using SQL
-To query **ANY** gist that you have access to (including any public gists), use the `github_gist` table.
+GitHub Gists are a simple way to share snippets and pastes with others. Gists are Git repositories, which means that you can fork and clone them. Gists can be public or secret, and you can share them with specific people using the GitHub interface.
+
+## Table Usage Guide
+
+The `github_my_gist` table provides insights into Gists within GitHub. As a developer or GitHub user, explore gist-specific details through this table, including file content, comments, and associated metadata. Utilize it to manage and analyze your Gists, such as those with certain content, the number of comments, and the details of the files in the Gists.
+
+**Important Notes**
+- To query **ANY** gist that you have access to (including any public gists), use the `github_gist` table.
## Examples
### List your gists
+Identify and review all the gists you have created on GitHub. This is useful for managing and keeping track of your code snippets shared through GitHub.
+
+```sql+postgres
+select
+ *
+from
+ github_my_gist;
+```
-```sql
+```sql+sqlite
select
*
from
@@ -16,8 +34,9 @@ from
```
### List your public gists
+Explore which of your code snippets on GitHub are publicly accessible. This is useful for reviewing your open-source contributions and ensuring you're not unintentionally sharing private code.
-```sql
+```sql+postgres
select
*
from
@@ -26,9 +45,19 @@ where
public;
```
+```sql+sqlite
+select
+ *
+from
+ github_my_gist
+where
+ public = 1;
+```
+
### Summarize your gists by language.
+Determine the distribution of your GitHub gists by programming language. This will help you understand the languages you use most frequently when creating gists.
-```sql
+```sql+postgres
select
file ->> 'language' as language,
count(*)
@@ -39,5 +68,18 @@ cross join
group by
language
order by
- count desc
+ count desc;
```
+
+```sql+sqlite
+select
+ json_extract(file.value, '$.language') as language,
+ count(*)
+from
+ github_my_gist g,
+ json_each(g.files) as file
+group by
+ language
+order by
+ count(*) desc;
+```
\ No newline at end of file
diff --git a/docs/tables/github_my_issue.md b/docs/tables/github_my_issue.md
index 4482c98a..cfc2d41a 100644
--- a/docs/tables/github_my_issue.md
+++ b/docs/tables/github_my_issue.md
@@ -1,21 +1,46 @@
-# Table: github_my_issue
+---
+title: "Steampipe Table: github_my_issue - Query GitHub Issues using SQL"
+description: "Allows users to query personal issues in GitHub, specifically focusing on the details of issues assigned to or created by the authenticated user."
+---
-GitHub Issues are used to track ideas, enhancements, tasks, or bugs for work on GitHub. The `github_my_issue` table lists issues that are assigned to you, across all repositories.
+# Table: github_my_issue - Query GitHub Issues using SQL
-To view **all the issues belonging to a repository**, use the `github_issue` table.
+GitHub Issues is a feature in GitHub that provides a platform to track bugs, enhancements, or other requests. It allows users to collaborate on tasks, discuss project details, and manage project timelines. Issues are a great way to keep track of tasks, improvements, and bugs for your projects.
+
+## Table Usage Guide
+
+The `github_my_issue` table provides insights into personal issues within GitHub. As a project manager or developer, explore issue-specific details through this table, including the issue title, state, assignee, and associated metadata. Utilize it to manage and track tasks, improvements, and bugs for your projects.
+
+**Important Notes**
+- To view **all the issues belonging to a repository**, use the `github_issue` table.
## Examples
### List all of the open issues assigned to you
+Explore which open issues are currently assigned to you on GitHub. This is useful for managing your workload and prioritizing tasks.
+
+```sql+postgres
+select
+ repository_full_name,
+ number,
+ title,
+ state,
+ author_login,
+ author_login
+from
+ github_my_issue
+where
+ state = 'OPEN';
+```
-```sql
+```sql+sqlite
select
repository_full_name,
number,
title,
state,
author_login,
- assignee_logins
+ author_login
from
github_my_issue
where
@@ -23,8 +48,9 @@ where
```
### List your 10 oldest open issues
+Explore which of your open issues have been unresolved the longest to help prioritize your workflow and manage your project effectively.
-```sql
+```sql+postgres
select
repository_full_name,
number,
@@ -40,3 +66,20 @@ order by
created_at
limit 10;
```
+
+```sql+sqlite
+select
+ repository_full_name,
+ number,
+ created_at,
+ julianday('now') - julianday(created_at) as age,
+ title,
+ state
+from
+ github_my_issue
+where
+ state = 'OPEN'
+order by
+ created_at
+limit 10;
+```
\ No newline at end of file
diff --git a/docs/tables/github_my_organization.md b/docs/tables/github_my_organization.md
index d32c2e8d..b427c3a8 100644
--- a/docs/tables/github_my_organization.md
+++ b/docs/tables/github_my_organization.md
@@ -1,14 +1,42 @@
-# Table: github_my_organization
+---
+title: "Steampipe Table: github_my_organization - Query GitHub Organizations using SQL"
+description: "Allows users to query GitHub Organizations, specifically details about a user's primary organization on GitHub. This table provides insights into the organization's details, members, teams, repositories, and more."
+---
-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.
+# Table: github_my_organization - Query GitHub Organizations using SQL
-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.
+GitHub Organizations are a shared workspace 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. GitHub Organizations help streamline project management and boost productivity in your organization.
+
+## Table Usage Guide
+
+The `github_my_organization` table provides insights into a user's primary organization on GitHub. As a project manager or team lead, explore organization-specific details through this table, including member access, repository details, and administrative features. Utilize it to manage and streamline your organization's projects and enhance team productivity.
+
+**Important Notes**
+- 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
+Determine the areas in which you hold membership across various GitHub organizations. This query is useful in understanding your involvement and role within these organizations, including details such as the number of private and public repositories, team counts, and member counts.
-```sql
+```sql+postgres
+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;
+```
+
+```sql+sqlite
select
login as organization,
name,
@@ -26,20 +54,44 @@ from
```
### Show all members for the GitHub Organizations to which you belong
+Determine the areas in which you are a member of a GitHub organization, offering insights into your collaborative coding environments and affiliations. This can be useful in managing and understanding your participation in various coding projects and teams.
-```sql
+```sql+postgres
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;
+ join github_organization_member m on o.login = m.organization;
+```
+
+```sql+sqlite
+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
+Explore your access level and permissions within your GitHub organization. This can help in understanding what actions you are authorized to perform, such as administering the organization, changing pinned items, creating projects, repositories, or teams, and whether you are currently a member.
-```sql
+```sql+postgres
+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;
+```
+
+```sql+sqlite
select
login as organization,
members_with_role_total_count as members_count,
@@ -54,8 +106,25 @@ from
```
### Show Organization security settings
+Gain insights into your organization's security settings, such as member permissions and two-factor authentication requirements. This can help ensure your organization's GitHub repositories and pages are appropriately protected.
+
+```sql+postgres
+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;
+```
-```sql
+```sql+sqlite
select
login as organization,
members_with_role_total_count as members_count,
@@ -72,8 +141,9 @@ from
```
### List organization hooks that are insecure
+Explore which organization hooks are potentially insecure due to specific settings, such as lack of SSL security, absence of a secret, or non-HTTPS URLs. This is particularly useful in identifying and mitigating potential security vulnerabilities within your organization's GitHub configuration.
-```sql
+```sql+postgres
select
login as organization,
hook
@@ -82,6 +152,19 @@ from
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:%';
+ or hook -> 'config' ->> 'secret' is null
+ or hook -> 'config' ->> 'url' not like '%https:%';
+```
+
+```sql+sqlite
+select
+ login as organization,
+ hook.value as hook
+from
+ github_my_organization,
+ json_each(hooks) as hook
+where
+ json_extract(hook.value, '$.config.insecure_ssl') = '1'
+ or json_extract(hook.value, '$.config.secret') is null
+ or json_extract(hook.value, '$.config.url') not like '%https:%';
```
\ No newline at end of file
diff --git a/docs/tables/github_my_repository.md b/docs/tables/github_my_repository.md
index 48329675..8c6fa93c 100644
--- a/docs/tables/github_my_repository.md
+++ b/docs/tables/github_my_repository.md
@@ -1,16 +1,37 @@
-# Table: github_my_repository
+---
+title: "Steampipe Table: github_my_repository - Query GitHub Repositories using SQL"
+description: "Allows users to query their GitHub Repositories, specifically focusing on repository details such as name, description, owner, and visibility status."
+---
-A repository contains all of your project's files and each file's revision history.
+# Table: github_my_repository - Query GitHub Repositories using SQL
-You can own repositories individually, or you can share ownership of repositories with other people in an organization. The `github_my_repository` table will list tables you own, you collaborate on, or that belong to your organizations.
+GitHub is a version control system that allows developers to collaborate on projects. Repositories in GitHub contain all of the project files and each file's revision history. They also contain a README file which provides information about the project. Repositories can be public or private, and they can be accessed and managed on GitHub's website.
-To query **ANY** repository, including public repos, use the `github_repository` table.
+## Table Usage Guide
+
+The `github_my_repository` table provides insights into personal GitHub repositories. As a developer or project manager, explore repository-specific details through this table, including repository name, description, owner, and visibility status. Utilize it to manage and monitor your repositories, such as checking the visibility status, reviewing the repository description, and identifying the repository owner.
+
+**Important Notes**
+- You can own repositories individually, or you can share ownership of repositories with other people in an organization. The `github_my_repository` table will list tables you own, you collaborate on, or that belong to your organizations.
+- To query **ANY** repository, including public repos, use the `github_repository` table.
## Examples
### List of repositories that you or your organizations own or contribute to
+Explore which repositories you or your organizations have ownership of or contribute to, in order to better understand your coding involvement and collaborations. This could be particularly useful for tracking project participation or evaluating the spread of your contributions.
-```sql
+```sql+postgres
+select
+ name,
+ owner_login,
+ name_with_owner
+from
+ github_my_repository
+order by
+ name_with_owner;
+```
+
+```sql+sqlite
select
name,
owner_login,
@@ -22,8 +43,9 @@ order by
```
### Show repository stats
+Explore your GitHub repositories' statistics to gain insights into popularity and user engagement. This query is useful in understanding the overall performance and reach of your repositories, including the primary language used, number of forks, stars, subscribers, watchers, and the last updated date.
-```sql
+```sql+postgres
select
name,
owner_login,
@@ -38,9 +60,37 @@ from
github_my_repository;
```
+```sql+sqlite
+select
+ name,
+ owner_login,
+ json_extract(primary_language, '$.name') as language,
+ fork_count,
+ stargazer_count,
+ subscribers_count,
+ watchers_total_count,
+ updated_at as last_updated,
+ description
+from
+ github_my_repository;
+```
+
### List your public repositories
+Explore which of your repositories on GitHub are publicly accessible. This is useful for ensuring your private work remains confidential while sharing the projects you wish to showcase.
+
+```sql+postgres
+select
+ name,
+ is_private,
+ visibility,
+ owner_login
+from
+ github_my_repository
+where
+ not is_private;
+```
-```sql
+```sql+sqlite
select
name,
is_private,
@@ -54,7 +104,18 @@ where
OR
-```sql
+```sql+postgres
+select
+ name,
+ is_private,
+ visibility
+from
+ github_my_repository
+where
+ visibility = 'PUBLIC';
+```
+
+```sql+sqlite
select
name,
is_private,
@@ -66,8 +127,21 @@ where
```
### List all your repositories and their collaborators
+Gain insights into the collaboration dynamics of your GitHub repositories by identifying the collaborators and their respective permissions. This can be useful in assessing access levels and ensuring proper project management.
-```sql
+```sql+postgres
+select
+ r.name_with_owner as repository_full_name,
+ c.user_login,
+ c.permission
+from
+ github_my_repository r
+ ,github_repository_collaborator c
+where
+ r.name_with_owner = c.repository_full_name;
+```
+
+```sql+sqlite
select
r.name_with_owner as repository_full_name,
c.user_login,
@@ -80,8 +154,9 @@ where
```
### List all your repository collaborators with admin or maintainer permissions
+Identify individuals with elevated access rights within your repositories. This can help enhance security by ensuring only necessary permissions are granted.
-```sql
+```sql+postgres
select
r.name_with_owner as repository_full_name,
c.user_login,
@@ -95,9 +170,25 @@ and
permission in ('ADMIN', 'MAINTAIN');
```
+```sql+sqlite
+select
+ r.name_with_owner as repository_full_name,
+ c.user_login,
+ c.permission
+from
+ github_my_repository r
+join
+ github_repository_collaborator c
+on
+ r.name_with_owner = c.repository_full_name
+where
+ c.permission in ('ADMIN', 'MAINTAIN');
+```
+
### List repository hooks that are insecure
+Discover the segments that have insecure settings in your GitHub repository hooks. This query is useful to identify potential security vulnerabilities in your repositories' hooks configuration.
-```sql
+```sql+postgres
select
name as repository,
hook
@@ -106,6 +197,19 @@ from
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:%';
+ or hook -> 'config' ->> 'secret' is null
+ or hook -> 'config' ->> 'url' not like '%https:%';
+```
+
+```sql+sqlite
+select
+ name as repository,
+ hook.value as hook
+from
+ github_my_repository,
+ json_each(hooks) as hook
+where
+ json_extract(hook.value, '$.config.insecure_ssl') = '1'
+ or json_extract(hook.value, '$.config.secret') is null
+ or json_extract(hook.value, '$.config.url') not like '%https:%';
```
\ No newline at end of file
diff --git a/docs/tables/github_my_star.md b/docs/tables/github_my_star.md
index c2be26c3..96427b48 100644
--- a/docs/tables/github_my_star.md
+++ b/docs/tables/github_my_star.md
@@ -1,14 +1,22 @@
-# Table: github_my_star
+---
+title: "Steampipe Table: github_my_star - Query GitHub My Stars using SQL"
+description: "Allows users to query My Stars in GitHub, specifically the repositories starred by the authenticated user, providing insights into user preferences and potential areas of interest."
+---
-Stars are used to have of list of repositories you have interest on.
+# Table: github_my_star - Query GitHub My Stars using SQL
-The `github_my_star` table can be used to query the repositories you have starred.
+GitHub Stars is a feature within GitHub that allows users to bookmark repositories for later reference. Users can star repositories to keep track of projects they find interesting, even if they do not directly contribute to them. This feature serves as a way to show appreciation for the repository maintainers' work and also to keep track of repositories for later use.
+
+## Table Usage Guide
+
+The `github_my_star` table provides insights into the repositories starred by the authenticated GitHub user. As a developer or project manager, explore details through this table, including repository names, owners, and star creation dates. Utilize it to analyze user preferences, discover potential areas of interest, and manage your starred repositories effectively.
## Examples
### List of your starred repositories
+Explore which repositories you've starred on Github, allowing you to quickly access and review your favorite projects. This is particularly useful for keeping track of repositories you find interesting or intend to contribute to in the future.
-```sql
+```sql+postgres
select
starred_at,
repository_full_name,
@@ -16,3 +24,12 @@ select
from
github_my_star;
```
+
+```sql+sqlite
+select
+ starred_at,
+ repository_full_name,
+ url
+from
+ github_my_star;
+```
\ No newline at end of file
diff --git a/docs/tables/github_my_team.md b/docs/tables/github_my_team.md
index 82a3ed1f..94dfe0c6 100644
--- a/docs/tables/github_my_team.md
+++ b/docs/tables/github_my_team.md
@@ -1,14 +1,37 @@
-# Table: github_my_team
+---
+title: "Steampipe Table: github_my_team - Query GitHub Teams using SQL"
+description: "Allows users to query Teams in GitHub, specifically the details of teams that the authenticated user is a part of, providing insights into team structure, access rights and associated repositories."
+---
-Teams are groups of organization members that reflect your company or group's structure with cascading access permissions and mentions. The `github_my_team` table lists all teams you're a member of across your organizations.
+# Table: github_my_team - Query GitHub Teams using SQL
-To view **all teams you have visibility to across your organizations,** use the `github_team` table.
+GitHub Teams is a feature within GitHub that allows for easy collaboration and access management within repositories. Teams can have different access rights to repositories and can consist of any number of users. Teams are a convenient way to manage large groups of users, both for assigning access rights and for mentioning multiple users at once.
+
+## Table Usage Guide
+
+The `github_my_team` table provides insights into Teams within GitHub. As a developer or project manager, explore team-specific details through this table, including access rights, team structure and associated repositories. Utilize it to uncover information about teams, such as those with admin access to repositories, the distribution of access rights within a team, and the verification of team members.
+
+**Important Notes**
+- To view **all teams you have visibility to across your organizations,** use the `github_team` table.
## Examples
### Basic info
+Discover the segments that make up your GitHub team, including the number of members and repositories, to gain insights into the team's structure and activities. This allows for better management and allocation of resources within the team.
+
+```sql+postgres
+select
+ name,
+ slug,
+ description,
+ organization,
+ members_total_count,
+ repositories_total_count
+from
+ github_my_team;
+```
-```sql
+```sql+sqlite
select
name,
slug,
@@ -21,26 +44,49 @@ from
```
### Get organization permission for each team
+Explore which permissions each team in your organization has on GitHub. This can help you manage access controls and ensure the right teams have the right permissions.
-```sql
+```sql+postgres
select
name,
organization,
- permission
+ privacy
+from
+ github_my_team;
+```
+
+```sql+sqlite
+select
+ name,
+ organization,
+ privacy
from
github_my_team;
```
### Get parent team details for child teams
+Determine the hierarchical structure within your GitHub organization by identifying which sub-teams have a parent team. This can help in understanding the team dynamics and collaboration structure within your organization.
-```sql
+```sql+postgres
select
slug,
organization,
- parent ->> 'id' as parent_team_id,
- parent ->> 'slug' as parent_team_slug
+ parent_team ->> 'id' as parent_team_id,
+ parent_team ->> 'slug' as parent_team_slug
from
github_my_team
where
- parent is not null;
+ parent_team is not null;
```
+
+```sql+sqlite
+select
+ slug,
+ organization,
+ json_extract(parent_team, '$.id') as parent_team_id,
+ json_extract(parent_team, '$.slug') as parent_team_slug
+from
+ github_my_team
+where
+ parent_team is not null;
+```
\ No newline at end of file
diff --git a/docs/tables/github_organization.md b/docs/tables/github_organization.md
index 0e10a3b7..de7298d6 100644
--- a/docs/tables/github_organization.md
+++ b/docs/tables/github_organization.md
@@ -1,16 +1,43 @@
-# Table: github_organization
+---
+title: "Steampipe Table: github_organization - Query GitHub Organizations using SQL"
+description: "Allows users to query GitHub Organizations, specifically details about each organization's profile, including name, email, blog, location, and public repository count."
+---
-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.
+# Table: github_organization - Query GitHub Organizations using SQL
-You can query details for **ANY** organization with the `github_organization` table, but you must specify the `login` explicitly in the where or join clause (`where login=`, `join github_organization on login=`).
+GitHub Organizations is a feature within GitHub that allows users to collaborate across many projects at once. Organizations include features such as unified billing, access control, and multiple repositories. It is a way for businesses and open-source projects to manage their projects and teams.
-To list organizations **that you are a member of**, use the `github_my_organization` table.
+## Table Usage Guide
+
+The `github_organization` table provides insights into Organizations within GitHub. As a developer or project manager, explore organization-specific details through this table, including profile information, public repository count, and associated metadata. Utilize it to uncover information about organizations, such as their location, public repository count, and other profile details.
+
+**Important Notes**
+- You must specify the `login` column in `where` or `join` clause to query the table.
+- To list organizations that you are a member of, use the `github_my_organization` table.
## Examples
### Basic info for a GitHub Organization
+Explore essential details about a specific GitHub organization to understand its structure and activity. This is useful for gaining insights into the organization's verification status, team and member counts, and repository count.
+
+```sql+postgres
+select
+ login as organization,
+ name,
+ twitter_username,
+ created_at,
+ updated_at,
+ is_verified,
+ teams_total_count as teams_count,
+ members_with_role_total_count as member_count,
+ repositories_total_count as repo_count
+from
+ github_organization
+where
+ login = 'postgres';
+```
-```sql
+```sql+sqlite
select
login as organization,
name,
@@ -28,8 +55,9 @@ where
```
### List members of an organization
+This query is used to identify members of a specific organization and check if they have two-factor authentication enabled. This can be useful for organizations looking to enforce security measures and ensure all members have additional protection for their accounts.
-```sql
+```sql+postgres
select
o.login as organization,
m.login as user_login,
@@ -43,9 +71,33 @@ and
o.login = m.organization;
```
+```sql+sqlite
+select
+ o.login as organization,
+ m.login as user_login,
+ m.has_two_factor_enabled as mfa_enabled
+from
+ github_organization o
+join
+ github_organization_member m on o.login = m.organization
+where
+ o.login = 'turbot';
+```
+
OR
-```sql
+```sql+postgres
+select
+ organization,
+ login as user_login,
+ has_two_factor_enabled as mfa_enabled
+from
+ github_organization_member
+where
+ organization = 'turbot';
+```
+
+```sql+sqlite
select
organization,
login as user_login,
diff --git a/docs/tables/github_organization_dependabot_alert.md b/docs/tables/github_organization_dependabot_alert.md
index 38a173c4..b11e28ff 100644
--- a/docs/tables/github_organization_dependabot_alert.md
+++ b/docs/tables/github_organization_dependabot_alert.md
@@ -1,14 +1,37 @@
-# Table: github_organization_dependabot_alert
+---
+title: "Steampipe Table: github_organization_dependabot_alert - Query GitHub Dependabot Alerts using SQL"
+description: "Allows users to query Dependabot Alerts in GitHub, specifically alert details such as status, severity, and package name, providing insights into security vulnerabilities in your GitHub organization's dependencies."
+---
-The `github_organization_dependabot_alert` table can be used to query information about dependabot alerts from an organization. You must be an owner or security manager for the organization to successfully query dependabot alerts.
+# Table: github_organization_dependabot_alert - Query GitHub Dependabot Alerts using SQL
-**You must specify the organization** in the where or join clause (`where organization=`, `join github_organization_depedanbot_alert on organization=`).
+GitHub Dependabot is a feature that helps you keep your dependencies up to date. It monitors your project's dependencies and sends you an alert when updates or security vulnerabilities are detected. Dependabot Alerts provide critical information about security vulnerabilities that can affect your project's dependencies.
+
+## Table Usage Guide
+
+The `github_organization_dependabot_alert` table provides insights into Dependabot Alerts within GitHub. As a security analyst or a developer, explore alert-specific details through this table, including alert status, severity, and package name. Utilize it to uncover information about security vulnerabilities in your GitHub organization's dependencies, helping you to keep your projects safe and up to date.
+
+**Important Notes**
+- You must specify the `organization` column in `where` or `join` clause to query the table.
## Examples
### List dependabot alerts
+Analyze the status and ecosystem of dependency packages in a specific organization using this query. It is particularly useful for identifying potential security vulnerabilities or outdated dependencies within your organization's codebase.
-```sql
+```sql+postgres
+select
+ organization,
+ state,
+ dependency_package_ecosystem,
+ dependency_package_name
+from
+ github_organization_dependabot_alert
+where
+ organization = 'my_org';
+```
+
+```sql+sqlite
select
organization,
state,
@@ -21,8 +44,22 @@ where
```
### List open dependabot alerts
+Discover the segments that have open alerts related to software dependencies within a specific organization. This can be used to identify areas that may be vulnerable or in need of updates, improving security and efficiency.
+
+```sql+postgres
+select
+ organization,
+ state,
+ dependency_package_ecosystem,
+ dependency_package_name
+from
+ github_organization_dependabot_alert
+where
+ organization = 'my_org'
+ and state = 'open';
+```
-```sql
+```sql+sqlite
select
organization,
state,
@@ -36,8 +73,9 @@ where
```
### List open critical dependabot alerts
+Determine the areas in which critical security threats are open in your organization's dependabot alerts. This query is useful for prioritizing security issues that need immediate attention.
-```sql
+```sql+postgres
select
organization,
state,
@@ -50,3 +88,17 @@ where
and state = 'open'
and security_advisory_severity = 'critical';
```
+
+```sql+sqlite
+select
+ organization,
+ state,
+ dependency_package_ecosystem,
+ dependency_package_name
+from
+ github_organization_dependabot_alert
+where
+ organization = 'my_org'
+ and state = 'open'
+ and security_advisory_severity = 'critical';
+```
\ No newline at end of file
diff --git a/docs/tables/github_organization_external_identity.md b/docs/tables/github_organization_external_identity.md
index f976e812..81bb7da4 100644
--- a/docs/tables/github_organization_external_identity.md
+++ b/docs/tables/github_organization_external_identity.md
@@ -1,14 +1,25 @@
-# Table: github_organization_external_identity
+---
+title: "Steampipe Table: github_organization_external_identity - Query GitHub Organization External Identities using SQL"
+description: "Allows users to query GitHub Organization External Identities, providing information about the external identity of users in a GitHub organization."
+---
-The `github_organization_external_identity` used to query information about external identities of an organization.
+# Table: github_organization_external_identity - Query GitHub Organization External Identities using SQL
-**You must specify the organization** in the where or join clause (`where organization=`, `join github_organization_external_identity on organization=`).
+GitHub Organization External Identities represent the mapping between a GitHub user and their linked identity at an Identity Provider. It provides information about the external identity of users in a GitHub organization. This data is particularly useful for organizations that use SAML single sign-on (SSO) in conjunction with GitHub.
+
+## Table Usage Guide
+
+The `github_organization_external_identity` table provides insights into the external identities of users within a GitHub organization. As a GitHub organization administrator, this table can be used to gain a comprehensive understanding of the linked identities of users at your Identity Provider. This can be particularly useful when managing users in organizations that use SAML single sign-on (SSO) with GitHub.
+
+**Important Notes**
+- You must specify the `organization` column in `where` or `join` clause to query the table.
## Examples
### List external identities of an organization
+This query is useful for gaining insights into the external identities associated with a specific organization. It allows you to identify the roles and usernames of these external identities, which can help in assessing the organization's security and access management structure.
-```sql
+```sql+postgres
select
guid,
user_login,
@@ -21,9 +32,23 @@ where
organization = 'turbot';
```
+```sql+sqlite
+select
+ guid,
+ user_login,
+ json_extract(saml_identity, '$.username') as saml_user,
+ json_extract(scim_identity, '$.username') as scim_user,
+ json_extract(organization_invitation, '$.role') as invited_role
+from
+ github_organization_external_identity
+where
+ organization = 'turbot';
+```
+
### List external identities for all your organizations
+This query is useful for gaining insights into the external identities linked to your organizations. It provides a comprehensive view of each user's login details, email, and role, which can be particularly beneficial for managing access and understanding user behavior across different platforms.
-```sql
+```sql+postgres
select
o.login as org,
o.saml_identity_provider ->> 'sso_url' as sso_url,
@@ -38,4 +63,21 @@ join
github_organization_external_identity e
on
o.login = e.organization;
+```
+
+```sql+sqlite
+select
+ o.login as org,
+ json_extract(o.saml_identity_provider, '$.sso_url') as sso_url,
+ e.user_login,
+ json_extract(e.user_detail, '$.email') as user_email,
+ json_extract(e.saml_identity, '$.username') as saml_user,
+ json_extract(e.scim_identity, '$.username') as scim_user,
+ json_extract(e.organization_invitation, '$.role') as invited_role
+from
+ github_my_organization o
+join
+ github_organization_external_identity e
+on
+ o.login = e.organization;
```
\ No newline at end of file
diff --git a/docs/tables/github_organization_member.md b/docs/tables/github_organization_member.md
index d0d86a76..05cd3c9e 100644
--- a/docs/tables/github_organization_member.md
+++ b/docs/tables/github_organization_member.md
@@ -1,14 +1,37 @@
-# Table: github_organization_member
+---
+title: "Steampipe Table: github_organization_member - Query GitHub Organization Members using SQL"
+description: "Allows users to query GitHub Organization Members, specifically the details of members within an organization, providing insights into member profiles, roles, and status."
+---
-The `github_organization_member` table can be used to query information about members of an organization. You must be an owner of the organization in order to successfully query member role and two factor authentication information. If you are not an owner of the organization, these columns will be returned as `null`.
+# Table: github_organization_member - Query GitHub Organization Members using SQL
-**You must specify the organization** in the where or join clause (`where organization=`, `join github_organization_member on organization=`).
+GitHub Organization Members is a feature within GitHub that allows you to manage and coordinate teams and repositories within your organization. It provides a centralized way to manage permissions for various repositories, assign roles to members, and monitor the status of each member. GitHub Organization Members helps you maintain control over the resources within your organization and manage member access effectively.
+
+## Table Usage Guide
+
+The `github_organization_member` table provides insights into members within a GitHub organization. As a project manager or team leader, explore member-specific details through this table, including roles, permissions, and status. Utilize it to uncover information about members, such as their roles within the organization, their access permissions, and their activity status.
+
+**Important Notes**
+- You must specify the `organization` column in `where` or `join` clause to query the table.
## Examples
### List organization members
+Explore which members belong to your organization and their respective roles, while also identifying if they have two-factor authentication enabled. This can enhance your organization's security by ensuring all members have this additional layer of protection.
+
+```sql+postgres
+select
+ organization,
+ login,
+ role,
+ has_two_factor_enabled
+from
+ github_organization_member
+where
+ organization = 'my_org';
+```
-```sql
+```sql+sqlite
select
organization,
login,
@@ -21,8 +44,9 @@ where
```
### List admin members with two factor authentication disabled
+Identify instances where administrative members in your organization have not enabled two-factor authentication, allowing you to enhance your organization's security by addressing these vulnerabilities.
-```sql
+```sql+postgres
select
organization,
login,
@@ -35,3 +59,17 @@ where
and role = 'ADMIN'
and not has_two_factor_enabled;
```
+
+```sql+sqlite
+select
+ organization,
+ login,
+ role,
+ has_two_factor_enabled
+from
+ github_organization_member
+where
+ organization = 'my_org'
+ and role = 'ADMIN'
+ and not has_two_factor_enabled;
+```
\ No newline at end of file
diff --git a/docs/tables/github_pull_request.md b/docs/tables/github_pull_request.md
index b94a87f6..4690e4f8 100644
--- a/docs/tables/github_pull_request.md
+++ b/docs/tables/github_pull_request.md
@@ -1,14 +1,40 @@
-# Table: github_pull_request
+---
+title: "Steampipe Table: github_pull_request - Query GitHub Pull Requests using SQL"
+description: "Allows users to query GitHub Pull Requests, providing detailed insights into pull requests across repositories."
+---
-GitHub pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch.
+# Table: github_pull_request - Query GitHub Pull Requests using SQL
+
+GitHub Pull Requests are a feature of GitHub, a web-based hosting service for version control using Git. Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch.
+
+## Table Usage Guide
+
+The `github_pull_request` table provides insights into pull requests within GitHub. As a developer or project manager, explore pull request-specific details through this table, including the status, assignees, reviewers, and associated metadata. Utilize it to track the progress of pull requests, identify bottlenecks in the review process, and ensure timely merging of approved changes.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) `where` or `join` clause to query the table.
-The `github_pull_request` table can be used to query issues belonging to a repository. **You must specify which repository** in a `where` or `join` clause (`where repository_full_name='`, `join github_pull_request on repository_full_name=`).
## Examples
### List open pull requests in a repository
+Determine the areas in which there are active discussions about code changes in a specific project. This is useful for project managers and contributors to track ongoing development efforts and understand the status of proposed modifications.
+
+```sql+postgres
+select
+ repository_full_name,
+ number,
+ title,
+ state,
+ mergeable
+from
+ github_pull_request
+where
+ repository_full_name = 'turbot/steampipe'
+ and state = 'OPEN';
+```
-```sql
+```sql+sqlite
select
repository_full_name,
number,
@@ -23,8 +49,9 @@ where
```
### List the pull requests for a repository that have been closed in the last week
+This example provides a way to monitor recent activity in a specific GitHub repository. It's particularly useful for project managers who want to track the progress of their projects by identifying which pull requests have been closed in the last week.
-```sql
+```sql+postgres
select
repository_full_name,
number,
@@ -32,7 +59,7 @@ select
state,
closed_at,
merged_at,
- merged_by_login
+ merged_by
from
github_pull_request
where
@@ -43,45 +70,95 @@ order by
closed_at desc;
```
-### List the open PRs in a repository with a given label
-
-```sql
+```sql+sqlite
+## Runtime error: parsing time "2023-12-01" as "2006-01-02 15:04:05.999": cannot parse "" as "15"
select
repository_full_name,
number,
title,
state,
- labels,
- tags
+ closed_at,
+ merged_at,
+ merged_by
from
github_pull_request
where
repository_full_name = 'turbot/steampipe'
- and state = 'OPEN'
- and tags ? 'bug';
+ and state = 'CLOSED'
+ and closed_at >= date('now','-7 day')
+order by
+ closed_at desc;
+```
+
+### List the open PRs in a repository with a given label
+Explore which open pull requests in a specific repository are tagged as 'bug'. This can help prioritize bug-fixing efforts and manage the project more efficiently.
+
+```sql+postgres
+select
+ repository_full_name,
+ number,
+ state,
+ labels
+from
+ github_pull_request
+where
+ repository_full_name = 'turbot/steampipe-plugin-aws'
+ and labels -> 'bug' = 'true';
+```
+
+```sql+sqlite
+select
+ repository_full_name,
+ number,
+ state,
+ labels
+from
+ github_pull_request
+where
+ repository_full_name = 'turbot/steampipe-plugin-aws'
+ and json_extract(labels, '$.bug') = 1;
```
### List the open PRs in a repository assigned to a specific user
+This query can be used to identify all the open pull requests in a specific repository that have been assigned to a particular user. This is useful in tracking and managing the workload of individual contributors within a project.
-```sql
+```sql+postgres
select
repository_full_name,
number,
title,
state,
- assigned_to
+ assignee_data ->> 'login' as assignee_login
from
github_pull_request,
- jsonb_array_elements_text(assignee_logins) as assigned_to
+ jsonb_array_elements(assignees) as assignee_data
where
- repository_full_name = 'turbot/steampipe'
- and assigned_to = 'binaek89'
+ repository_full_name = 'turbot/steampipe-plugin-aws'
+ and assignee_data ->> 'login' = 'madhushreeray30'
+ and state = 'OPEN';
+```
+
+```sql+sqlite
+select
+ repository_full_name,
+ number,
+ title,
+ state,
+ json_extract(assignee_data.value, '$.login') as assignee_login
+from
+ github_pull_request,
+ json_each(assignees) as assignee_data
+where
+ repository_full_name = 'turbot/steampipe-plugin-aws'
+ and json_extract(assignee_data.value, '$.login') = 'madhushreeray30'
and state = 'OPEN';
+
```
### Join with github_my_repository to find open PRs in multiple repos
+This query allows you to identify open pull requests across multiple repositories within the 'turbot/steampipe' project. It's particularly useful for project managers who need to track ongoing contributions and updates across various parts of the project.
-```sql
+```sql+postgres
select
i.repository_full_name,
i.number,
@@ -89,17 +166,32 @@ select
from
github_my_repository as r,
github_pull_request as i
-where
- r.full_name like 'turbot/steampip%'
+where
+ r.name_with_owner like 'turbot/steampip%'
and i.state = 'OPEN'
- and i.repository_full_name = r.full_name;
+ and i.repository_full_name = r.name_with_owner;
+```
+
+```sql+sqlite
+select
+ i.repository_full_name,
+ i.number,
+ i.title
+from
+ github_my_repository as r,
+ github_pull_request as i
+where
+ r.name_with_owner like 'turbot/steampip%'
+ and i.state = 'OPEN'
+ and i.repository_full_name = r.name_with_owner;
```
### List open PRs in a repository with an array of associated labels
+This query is useful for exploring open pull requests in a specific repository, along with their associated labels. This can help in managing and prioritizing work by understanding the context and importance of each pull request.
-```sql
+```sql+postgres
select
- r.repository_full_name
+ r.repository_full_name,
r.number,
r.title,
jsonb_agg(l ->> 'name') as labels
@@ -108,15 +200,30 @@ from
jsonb_array_elements(r.labels_src) as l
where
repository_full_name = 'turbot/steampipe'
-and
- state = 'OPEN'
+ and state = 'OPEN'
+group by
+ r.repository_full_name, r.number, r.title;
+```
+
+```sql+sqlite
+select
+ r.repository_full_name,
+ r.number,
+ r.title,
+ json_group_array(json_extract(l.value, '$.name')) as labels
+from
+ github_pull_request r,
+ json_each(r.labels_src) as l
+where
+ repository_full_name = 'turbot/steampipe'
+ and state = 'OPEN'
group by
r.repository_full_name, r.number, r.title;
```
OR
-```sql
+```sql+postgres
select
repository_full_name,
number,
@@ -127,29 +234,23 @@ from
jsonb_object_keys(r.labels) as t
where
repository_full_name = 'turbot/steampipe'
-and
- state = 'OPEN'
+ and state = 'OPEN'
group by
repository_full_name, number, title;
```
-### List all open PRs in a repository with a specific label
-
-```sql
+```sql+sqlite
select
repository_full_name,
number,
title,
- json_agg(t) as labels
+ json_group_array(t.value) as labels
from
github_pull_request r,
- jsonb_object_keys(labels) as t
+ json_each(r.labels) as t
where
repository_full_name = 'turbot/steampipe'
-and
- state = 'OPEN'
-and
- labels ? 'bug'
+ and state = 'OPEN'
group by
repository_full_name, number, title;
```
\ No newline at end of file
diff --git a/docs/tables/github_pull_request_comment.md b/docs/tables/github_pull_request_comment.md
index 999803ec..0dcc1f90 100644
--- a/docs/tables/github_pull_request_comment.md
+++ b/docs/tables/github_pull_request_comment.md
@@ -1,14 +1,25 @@
-# Table: github_pull_request_comment
+---
+title: "Steampipe Table: github_pull_request_comment - Query GitHub Pull Request Comments using SQL"
+description: "Allows users to query GitHub Pull Request Comments, specifically the details of each comment made on pull requests, providing insights into discussions and feedbacks on code changes."
+---
-The `github_pull_request_comment` table can be used to query comments from a specific pull request.
+# Table: github_pull_request_comment - Query GitHub Pull Request Comments using SQL
-**You must specify `repository_full_name` (repository including org/user prefix) and `number` (of the issue) in the WHERE or JOIN clause.**
+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.
-```sql
+```sql+postgres
select
id,
author_login,
@@ -24,13 +35,49 @@ from
github_pull_request_comment
where
repository_full_name = 'turbot/steampipe-plugin-github'
-and
- number = 207;
+ and number = 207;
+```
+
+```sql+sqlite
+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.
+
+```sql+postgres
+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%';
+```
-```sql
+```sql+sqlite
select
id,
number as issue,
@@ -43,26 +90,30 @@ from
github_pull_request_comment
where
repository_full_name = 'turbot/steampipe-plugin-github'
-and
- number = 207
-and
- body_text ~~* '%DELAY%';
+ and number = 207
+ and body_text like '%DELAY%';
```
### List comments for all open pull requests from a specific repository
-```sql
+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.
+```sql+postgres
+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';
+```
+
+```sql+sqlite
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
+ 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';
+ and r.state = 'OPEN';
```
\ No newline at end of file
diff --git a/docs/tables/github_pull_request_review.md b/docs/tables/github_pull_request_review.md
index f977aaba..2ceb6236 100644
--- a/docs/tables/github_pull_request_review.md
+++ b/docs/tables/github_pull_request_review.md
@@ -1,14 +1,41 @@
-# Table: github_pull_request_review
+---
+title: "Steampipe Table: github_pull_request_review - Query GitHub Pull Request Reviews using SQL"
+description: "Allows users to query Pull Request Reviews in GitHub, specifically the review comments, review status, and the reviewer details, providing insights into the review process of pull requests."
+---
-The `github_pull_request_review` table can be used to query reviews from a specific pull request.
+# Table: github_pull_request_review - Query GitHub Pull Request Reviews using SQL
-**You must specify `repository_full_name` (repository including org/user prefix) and `number` (of the pull request) in the WHERE or JOIN clause.**
+A GitHub Pull Request Review is a feature within GitHub that allows users to provide feedback on pull requests. It provides a collaborative platform for code review where users can comment, approve or request changes on the proposed code changes. GitHub Pull Request Reviews help to ensure code quality and maintainability by facilitating peer review before code merging.
+
+## Table Usage Guide
+
+The `github_pull_request_review` table provides insights into the review process of pull requests within GitHub. As a developer or a team lead, explore review-specific details through this table, including the review comments, review status, and the reviewer details. Utilize it to understand the feedback on pull requests, the approval process, and to gain insights into the code review practices in your projects.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) and `number` (of the PR) columns in the `where` or `join` clause to query the table.
## Examples
### List all reviews for a specific pull request
+Explore all feedback for a specific project update. This is particularly useful for developers and project managers who want to understand the team's thoughts, concerns, and suggestions regarding a particular code change or feature addition.
-```sql
+```sql+postgres
+select
+ id,
+ author_login,
+ author_association,
+ state,
+ body,
+ submitted_at,
+ url
+from
+ github_pull_request_review
+where
+ repository_full_name = 'turbot/steampipe-plugin-github'
+ and number = 207;
+```
+
+```sql+sqlite
select
id,
author_login,
@@ -25,8 +52,9 @@ where
```
### List reviews for a specific pull request which match a certain body content
+This query is useful for identifying specific feedback within the reviews of a particular pull request. It can help you to pinpoint comments that match a certain keyword, enabling you to quickly find and address relevant concerns or suggestions.
-```sql
+```sql+postgres
select
id,
number as issue,
@@ -40,21 +68,47 @@ from
where
repository_full_name = 'turbot/steampipe-plugin-github'
and number = 207
- and body ~~ * '%minor%';
+ and body like '%minor%';
+```
+
+```sql+sqlite
+select
+ id,
+ number as issue,
+ author_login as comment_author,
+ author_association,
+ body as content,
+ submitted_at,
+ url
+from
+ github_pull_request_review
+where
+ repository_full_name = 'turbot/steampipe-plugin-github'
+ and number = 207
+ and body like '%minor%';
```
### List reviews for all open pull requests from a specific repository
+Determine the areas in which feedback has been provided for all active changes proposed in a specific project. This can be useful to understand the type of improvements or modifications suggested by contributors during the development process.
-```sql
+```sql+postgres
select
rv.*
from
github_pull_request r
- join
- github_pull_request_review rv
- on r.repository_full_name = rv.repository_full_name
- and r.number = rv.number
+ join github_pull_request_review rv on r.repository_full_name = rv.repository_full_name and r.number = rv.number
where
r.repository_full_name = 'turbot/steampipe-plugin-github'
and r.state = 'OPEN';
```
+
+```sql+sqlite
+select
+ rv.*
+from
+ github_pull_request r
+ join github_pull_request_review rv on r.repository_full_name = rv.repository_full_name and r.number = rv.number
+where
+ r.repository_full_name = 'turbot/steampipe-plugin-github'
+ and r.state = 'OPEN';
+```
\ No newline at end of file
diff --git a/docs/tables/github_rate_limit.md b/docs/tables/github_rate_limit.md
index 47178d1b..ad497dad 100644
--- a/docs/tables/github_rate_limit.md
+++ b/docs/tables/github_rate_limit.md
@@ -1,12 +1,32 @@
-# Table: github_rate_limit
+---
+title: "Steampipe Table: github_rate_limit - Query GitHub Rate Limits using SQL"
+description: "Allows users to query GitHub Rate Limits, providing insights into the maximum number of requests that the user can make to the GitHub API within an hour."
+---
-With the Rate Limit API, you can check the current rate limit status of various REST APIs.
+# Table: github_rate_limit - Query GitHub Rate Limits using SQL
+
+GitHub Rate Limits are a part of the GitHub API that sets the maximum number of requests that a user can make within an hour. These limits are designed to prevent abuse and ensure fair usage of the GitHub API. They apply to authenticated and unauthenticated users, and vary depending on the type of authentication used.
+
+## Table Usage Guide
+
+The `github_rate_limit` table provides insights into the rate limits set by GitHub for API usage. As a developer or system administrator, you can use this table to monitor your application's API usage, ensuring it stays within the prescribed limits to avoid service disruption. This table is also useful for planning and optimizing the distribution of API requests to maximize efficiency and avoid hitting the rate limit.
## Examples
### List rate limit of rest apis
+Explore the usage of your REST APIs by identifying the remaining and maximum allowed requests. This is beneficial to avoid hitting rate limits and ensuring smooth operation of your services.
+
+```sql+postgres
+select
+ core_limit,
+ core_remaining,
+ search_limit,
+ search_remaining
+from
+ github_rate_limit;
+```
-```sql
+```sql+sqlite
select
core_limit,
core_remaining,
diff --git a/docs/tables/github_rate_limit_graphql.md b/docs/tables/github_rate_limit_graphql.md
index fd6c9777..48b082cd 100644
--- a/docs/tables/github_rate_limit_graphql.md
+++ b/docs/tables/github_rate_limit_graphql.md
@@ -1,14 +1,32 @@
-# Table: github_rate_limit_graphql
+---
+title: "Steampipe Table: github_rate_limit_graphql - Query GitHub GraphQL API Rate Limits using SQL"
+description: "Allows users to query GitHub GraphQL API Rate Limits, providing insights into the current rate limit status for the GraphQL API."
+---
-This table allows you to check the current rate limit status for the GitHub GraphQL API endpoint.
+# Table: github_rate_limit_graphql - Query GitHub GraphQL API Rate Limits using SQL
+
+GitHub's GraphQL API Rate Limiting is a feature that prevents excessive use of the API by limiting the number of requests that can be made within a certain time frame. This feature helps ensure fair usage and prevents any single user from monopolizing the API resources. It provides a mechanism to monitor and manage the rate at which applications can access the API.
+
+## Table Usage Guide
+
+The `github_rate_limit_graphql` table provides insights into the rate limiting status for GitHub's GraphQL API. As a developer or DevOps engineer, you can use this table to monitor the current rate limit status of your application's API usage. This can be particularly useful in managing and optimizing your application's API requests to ensure they stay within the allowed limits.
## Examples
-### List rate limit info for GraphQL
+### List rate limit info for GraphQL
+Assess the usage and availability of your GraphQL rate limit on GitHub to manage your API requests effectively and avoid exceeding the limit. This helps in planning your application's interactions with GitHub's API and ensures uninterrupted service.
+
+```sql+postgres
+select
+ used,
+ remaining,
+ reset_at
+from
+ github_rate_limit_graphql;
+```
-```sql
+```sql+sqlite
select
- limit,
used,
remaining,
reset_at
diff --git a/docs/tables/github_release.md b/docs/tables/github_release.md
index 2bdbeeee..722d22ad 100644
--- a/docs/tables/github_release.md
+++ b/docs/tables/github_release.md
@@ -1,14 +1,37 @@
-# Table: github_release
+---
+title: "Steampipe Table: github_release - Query GitHub Releases using SQL"
+description: "Allows users to query GitHub Releases, specifically providing detailed information about each release of a repository, including release id, tag name, draft status, prerelease status, and more."
+---
-A release is a package of software, along with release notes and links to binary files, for other people to use.
+# Table: github_release - Query GitHub Releases using SQL
-The `github_release` table can be used to query information about any release, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Releases is a feature of GitHub that allows you to present significant points in your repository's history, such as milestone versions, by associating them with tags. You can use GitHub Releases to manage and upload binary files, as well as providing release notes and links to binary files, directly from a repository. GitHub Releases is a great way to package software, release notes, and links to binary files for other people to use.
+
+## Table Usage Guide
+
+The `github_release` table provides insights into GitHub Releases within a repository. As a software developer or project manager, explore release-specific details through this table, including release id, tag name, draft status, prerelease status, and more. Utilize it to track the progress and status of different versions of your software, identify any prerelease versions, and manage your software releases more effectively.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) column in the `where` or `join` clause to query the table.
## Examples
### List releases
+Explore the timeline of updates for the Steampipe project on Github. This allows you to track the progression of the project over time, helping you stay updated on new releases and changes.
-```sql
+```sql+postgres
+select
+ name,
+ published_at
+from
+ github_release
+where
+ repository_full_name = 'turbot/steampipe'
+order by
+ published_at desc;
+```
+
+```sql+sqlite
select
name,
published_at
@@ -21,8 +44,9 @@ order by
```
### Download statistics per release
+Explore the popularity of different Steampipe releases by tracking the number of downloads. This can help in understanding user preferences and identifying the most successful releases.
-```sql
+```sql+postgres
select
r.name as release_name,
r.published_at,
@@ -38,3 +62,20 @@ order by
r.published_at desc,
asset_name;
```
+
+```sql+sqlite
+select
+ r.name as release_name,
+ r.published_at,
+ json_extract(a.value, '$.name') as asset_name,
+ json_extract(a.value, '$.download_count') as download_count
+from
+ github_release as r,
+ json_each(assets) as a
+where
+ r.repository_full_name = 'turbot/steampipe'
+ and json_extract(a.value, '$.content_type') in ('application/zip', 'application/gzip')
+order by
+ r.published_at desc,
+ asset_name;
+```
\ No newline at end of file
diff --git a/docs/tables/github_repository.md b/docs/tables/github_repository.md
index 719bdd7a..678e200e 100644
--- a/docs/tables/github_repository.md
+++ b/docs/tables/github_repository.md
@@ -1,16 +1,26 @@
-# Table: github_repository
+---
+title: "Steampipe Table: github_repository - Query GitHub Repositories using SQL"
+description: "Allows users to query GitHub Repositories, providing detailed information about each repository including its owner, name, description, visibility, and more."
+---
-A repository contains all of your project's files and each file's revision history.
+# Table: github_repository - Query GitHub Repositories using SQL
-The `github_repository` table can be used to query information about **ANY** repository, and **you must specify which repository** in the where or join clause (`where full_name=`, `join github_repository on full_name=`).
+GitHub is a web-based hosting service for version control using Git. It offers all of the distributed version control and source code management (SCM) functionality of Git, as well as adding its own features. GitHub provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project.
-To list all of **your** repositories use the `github_my_repository` table instead. The `github_my_repository` table will list tables you own, you collaborate on, or that belong to your organizations.
+## Table Usage Guide
+
+The `github_repository` table provides insights into repositories within GitHub. As a developer or project manager, explore repository-specific details through this table, including owner details, repository names, descriptions, and visibility status. Utilize it to uncover information about repositories, such as those with public or private visibility, the owner of each repository, and the description of what each repository contains.
+
+**Important Notes**
+- You must specify the `full_name` (repository including org/user prefix) column in the `where` or `join` clause to query the table.
+- To list all of your repositories use the `github_my_repository` table instead. The `github_my_repository` table will list tables you own, you collaborate on, or that belong to your organizations.
## Examples
### Get information about a specific repository
+Discover the details of a specific GitHub repository, such as its creation date, update history, disk usage, owner, primary language, number of forks, star count, URL, license information, and description. This is beneficial for gaining insights into the repository's overall status, usage, and popularity.
-```sql
+```sql+postgres
select
name,
node_id,
@@ -31,9 +41,46 @@ where
full_name = 'postgres/postgres';
```
+```sql+sqlite
+select
+ name,
+ node_id,
+ id,
+ created_at,
+ updated_at,
+ disk_usage,
+ owner_login,
+ json_extract(primary_language, '$.name') as language,
+ fork_count,
+ stargazer_count,
+ url,
+ json_extract(license_info, '$.spdx_id') as license,
+ description
+from
+ github_repository
+where
+ full_name = 'postgres/postgres';
+```
+
### Get your permissions for a specific repository
+This query allows you to understand the level of access you have to a particular repository, such as whether you can administer, create projects, subscribe, or update topics. It's useful to ensure you have the correct permissions for your intended actions, helping to avoid unexpected access issues.
+
+```sql+postgres
+select
+ name,
+ your_permission,
+ can_administer,
+ can_create_projects,
+ can_subscribe,
+ can_update_topics,
+ possible_commit_emails
+from
+ github_repository
+where
+ full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
name,
your_permission,
diff --git a/docs/tables/github_repository_collaborator.md b/docs/tables/github_repository_collaborator.md
index 6660aff5..d60eaa40 100644
--- a/docs/tables/github_repository_collaborator.md
+++ b/docs/tables/github_repository_collaborator.md
@@ -1,14 +1,35 @@
-# Table: github_repository_collaborator
+---
+title: "Steampipe Table: github_repository_collaborator - Query GitHub Repository Collaborators using SQL"
+description: "Allows users to query GitHub Repository Collaborators, providing detailed information about collaboration permissions and the status of invitations."
+---
-A collaborator is a user who has permissions to contribute to a repository.
+# Table: github_repository_collaborator - Query GitHub Repository Collaborators using SQL
-**You must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Repository Collaborators are users who have been granted access to contribute to a repository. Collaborators can be given different levels of access, from read-only to full admin rights. The status of their invitation, whether it's pending acceptance or has been accepted, is also tracked.
+
+## Table Usage Guide
+
+The `github_repository_collaborator` table provides insights into the collaborators associated with GitHub repositories. As a repository manager, you can use this table to explore details about collaborators, including their permissions and the status of their invitations. This can be particularly useful for managing access control and ensuring the appropriate level of access is granted to each collaborator.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) column in the `where` or `join` clause to query the table.
## Examples
### List all contributors of a repository
+Determine the areas in which various users have permissions within a specific project. This is useful for project managers who need to understand the roles and access levels of different contributors to better manage project resources and responsibilities.
+
+```sql+postgres
+select
+ user_login,
+ permission
+from
+ github_repository_collaborator
+where
+ repository_full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
user_login,
permission
@@ -19,8 +40,20 @@ where
```
### List all outside collaborators on a repository
+Determine the areas in which outside collaborators have access within a specific repository. This is useful for ensuring appropriate access levels and identifying potential security risks.
+
+```sql+postgres
+select
+ user_login,
+ permission
+from
+ github_repository_collaborator
+where
+ repository_full_name = 'turbot/steampipe'
+ and affiliation = 'OUTSIDE';
+```
-```sql
+```sql+sqlite
select
user_login,
permission
@@ -28,13 +61,24 @@ from
github_repository_collaborator
where
repository_full_name = 'turbot/steampipe'
-and
- affiliation = 'OUTSIDE';
+ and affiliation = 'OUTSIDE';
```
### List all repository admins
+Identify instances where users have administrative access in a specific GitHub repository. This could be useful in managing access control and ensuring the right people have the appropriate permissions.
+
+```sql+postgres
+select
+ user_login,
+ permission
+from
+ github_repository_collaborator
+where
+ repository_full_name = 'turbot/steampipe'
+ and permission = 'ADMIN';
+```
-```sql
+```sql+sqlite
select
user_login,
permission
@@ -42,30 +86,42 @@ from
github_repository_collaborator
where
repository_full_name = 'turbot/steampipe'
-and
- permission = 'ADMIN';
+ and permission = 'ADMIN';
```
### Obtain a JSON array of admins for all your repositories
+Discover the segments that allow you to identify all the administrators for your GitHub repositories. This is useful for managing access and permissions across your repositories.
-```sql
+```sql+postgres
with repos as (
- select
- name_with_owner
- from
+ select
+ name_with_owner
+ from
github_my_repository
)
select
r.name_with_owner as repo,
json_agg(user_login) as admins
-from
+from
repos as r
-inner join
- github_repository_collaborator as c
-on
- r.name_with_owner = c.repository_full_name
-and
- c.permission = 'ADMIN'
-group by
+ inner join github_repository_collaborator as c on r.name_with_owner = c.repository_full_name and c.permission = 'ADMIN'
+group by
r.name_with_owner;
```
+
+```sql+sqlite
+with repos as (
+ select
+ name_with_owner
+ from
+ github_my_repository
+)
+select
+ r.name_with_owner as repo,
+ group_concat(user_login) as admins
+from
+ repos as r
+ inner join github_repository_collaborator as c on r.name_with_owner = c.repository_full_name and c.permission = 'ADMIN'
+group by
+ r.name_with_owner;
+```
\ No newline at end of file
diff --git a/docs/tables/github_repository_dependabot_alert.md b/docs/tables/github_repository_dependabot_alert.md
index 44ee250a..7afaff6a 100644
--- a/docs/tables/github_repository_dependabot_alert.md
+++ b/docs/tables/github_repository_dependabot_alert.md
@@ -1,14 +1,36 @@
-# Table: github_repository_dependabot_alert
+---
+title: "Steampipe Table: github_repository_dependabot_alert - Query GitHub Dependabot Alerts using SQL"
+description: "Allows users to query Dependabot Alerts in GitHub repositories, providing insights into potential security vulnerabilities within project dependencies."
+---
-The `github_repository_dependabot_alert` table can be used to query information about dependabot alerts from a repository.
+# Table: github_repository_dependabot_alert - Query GitHub Dependabot Alerts using SQL
-**You must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Dependabot is a feature within the GitHub platform that monitors your project dependencies for known security vulnerabilities and automatically opens pull requests to update them to the minimum required version. It provides an automated way to keep your project dependencies up-to-date and secure. GitHub Dependabot helps you maintain the security and reliability of your projects by identifying and suggesting updates for vulnerable dependencies.
+
+## Table Usage Guide
+
+The `github_repository_dependabot_alert` table provides insights into Dependabot alerts within GitHub repositories. As a project maintainer or security engineer, explore alert-specific details through this table, including the dependency name, version, and associated security vulnerabilities. Utilize it to uncover information about potentially insecure dependencies, helping you to maintain the security and integrity of your projects.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) column in the `where` or `join` clause to query the table.
## Examples
### List dependabot alerts
+Identify the status and type of dependabot alerts for a specific repository to maintain and upgrade dependencies efficiently.
+
+```sql+postgres
+select
+ state,
+ dependency_package_ecosystem,
+ dependency_package_name
+from
+ github_repository_dependabot_alert
+where
+ repository_full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
state,
dependency_package_ecosystem,
@@ -20,8 +42,21 @@ where
```
### List open dependabot alerts
+Discover the segments that have active dependency alerts within a specific GitHub repository. This query is useful for maintaining security and up-to-date dependencies in your projects.
-```sql
+```sql+postgres
+select
+ state,
+ dependency_package_ecosystem,
+ dependency_package_name
+from
+ github_repository_dependabot_alert
+where
+ repository_full_name = 'turbot/steampipe'
+ and state = 'open';
+```
+
+```sql+sqlite
select
state,
dependency_package_ecosystem,
@@ -34,8 +69,9 @@ where
```
### List open critical dependabot alerts
+Explore critical alerts in your repository's dependencies that are currently open. This is useful for quickly identifying potential security risks within your project's ecosystem.
-```sql
+```sql+postgres
select
state,
dependency_package_ecosystem,
@@ -47,3 +83,16 @@ where
and state = 'open'
and security_advisory_severity = 'critical';
```
+
+```sql+sqlite
+select
+ state,
+ dependency_package_ecosystem,
+ dependency_package_name
+from
+ github_repository_dependabot_alert
+where
+ repository_full_name = 'turbot/steampipe'
+ and state = 'open'
+ and security_advisory_severity = 'critical';
+```
\ No newline at end of file
diff --git a/docs/tables/github_repository_deployment.md b/docs/tables/github_repository_deployment.md
index ed0bcc4b..8e69530d 100644
--- a/docs/tables/github_repository_deployment.md
+++ b/docs/tables/github_repository_deployment.md
@@ -1,21 +1,31 @@
-# Table: github_repository_deployment
+---
+title: "Steampipe Table: github_repository_deployment - Query GitHub Repositories using SQL"
+description: "Allows users to query GitHub Repositories, specifically the deployment information, providing insights into the deployment status, environment, and associated metadata."
+---
-The `github_repository_deployment` table can be used to query deployments for a specific repository.
+# Table: github_repository_deployment - Query GitHub Repositories using SQL
-**You must specify `repository_full_name` in the WHERE or JOIN clause.**
+GitHub Repositories are a fundamental resource in GitHub that allow users to manage and store revisions of projects. Repositories contain all of the project files and revision history. Users can work together within a repository to edit and manage the project.
+
+## Table Usage Guide
+
+The `github_repository_deployment` table offers insights into GitHub repositories' deployment details. As a developer or project manager, you can use this table to retrieve deployment status, environment, and related metadata for each repository. This can be particularly useful for monitoring deployment progress, identifying deployment patterns, and troubleshooting deployment issues.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) column in the `where` or `join` clause to query the table.
## Examples
### List deployments for a repository
+Explore the deployment history of a specific repository to understand its version updates and changes made by different contributors. This is useful in tracking the evolution of a project and assessing its progress over time.
-```sql
+```sql+postgres
select
id,
node_id,
- sha,
+ commit_sha,
created_at,
creator ->> 'login' as creator_login,
- commit_sha,
description,
environment,
latest_status,
@@ -31,13 +41,35 @@ where
repository_full_name = 'turbot/steampipe';
```
+```sql+sqlite
+select
+ id,
+ node_id,
+ commit_sha,
+ created_at,
+ json_extract(creator, '$.login') as creator_login,
+ description,
+ environment,
+ latest_status,
+ payload,
+ json_extract(ref, '$.prefix') as ref_prefix,
+ json_extract(ref, '$.name') as ref_name,
+ state,
+ task,
+ updated_at
+from
+ github_repository_deployment
+where
+ repository_full_name = 'turbot/steampipe';
+```
+
### List deployments for all your repositories
+Explore the deployment history across all your GitHub repositories. This query helps you assess the details of each deployment such as its creator, status, environment, and more, providing a comprehensive view of your repositories' deployment activities.
-```sql
+```sql+postgres
select
id,
node_id,
- sha,
created_at,
creator ->> 'login' as creator_login,
commit_sha,
@@ -53,5 +85,27 @@ select
from
github_repository_deployment
where
- repository_full_name IN (select name_with_owner from github_my_repository);
+ repository_full_name in (select name_with_owner from github_my_repository);
+```
+
+```sql+sqlite
+select
+ id,
+ node_id,
+ created_at,
+ json_extract(creator, '$.login') as creator_login,
+ commit_sha,
+ description,
+ environment,
+ latest_status,
+ payload,
+ json_extract(ref, '$.prefix') as ref_prefix,
+ json_extract(ref, '$.name') as ref_name,
+ state,
+ task,
+ updated_at
+from
+ github_repository_deployment
+where
+ repository_full_name in (select name_with_owner from github_my_repository);
```
\ No newline at end of file
diff --git a/docs/tables/github_repository_environment.md b/docs/tables/github_repository_environment.md
index 6097f79a..96d57523 100644
--- a/docs/tables/github_repository_environment.md
+++ b/docs/tables/github_repository_environment.md
@@ -1,14 +1,36 @@
-# Table: github_repository_environment
+---
+title: "Steampipe Table: github_repository_environment - Query GitHub Repository Environments using SQL"
+description: "Allows users to query GitHub Repository Environments, specifically details about each environment associated with a repository, providing insights into environment names, URLs, and protection rules."
+---
-The `github_repository_environment` table can be used to query environments belonging to a repository.
+# Table: github_repository_environment - Query GitHub Repository Environments using SQL
-**You must specify `repository_full_name` in the WHERE or JOIN clause.**
+GitHub Repository Environments are a feature of GitHub that allows developers to manage and track their software deployment pipelines. Each environment represents a stage in the deployment workflow, such as production, staging, or testing. Environments can have specific deployment policies and protection rules, providing a controlled and secure workflow for deploying software.
+
+## Table Usage Guide
+
+The `github_repository_environment` table provides insights into GitHub repository environments. As a DevOps engineer or a repository manager, explore environment-specific details through this table, including environment names, URLs, and protection rules. Utilize it to manage and monitor the deployment workflow, ensuring controlled and secure software deployment.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) column in the `where` or `join` clause to query the table.
## Examples
### List environments for a repository
+Explore which environments are associated with a particular repository. This can be useful for understanding the different settings where your code is being tested or deployed.
+
+```sql+postgres
+select
+ id,
+ node_id,
+ name
+from
+ github_repository_environment
+where
+ repository_full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
id,
node_id,
@@ -20,8 +42,20 @@ where
```
### List environments all your repositories
+Discover the segments that contain all your repository environments. This allows you to identify and manage the environments in which your code is running, helping you enhance your project's efficiency and security.
+
+```sql+postgres
+select
+ id,
+ node_id,
+ name
+from
+ github_repository_environment
+where
+ repository_full_name in (select name_with_owner from github_my_repository);
+```
-```sql
+```sql+sqlite
select
id,
node_id,
@@ -29,5 +63,5 @@ select
from
github_repository_environment
where
- repository_full_name IN (select name_with_owner from github_my_repository);
+ repository_full_name in (select name_with_owner from github_my_repository);
```
\ No newline at end of file
diff --git a/docs/tables/github_repository_sbom.md b/docs/tables/github_repository_sbom.md
index 049bbc7b..f64636d6 100644
--- a/docs/tables/github_repository_sbom.md
+++ b/docs/tables/github_repository_sbom.md
@@ -1,14 +1,25 @@
-# Table: github_repository_sbom
+---
+title: "Steampipe Table: github_repository_sbom - Query GitHub Repositories using SQL"
+description: "Allows users to query GitHub Repositories, specifically the Software Bill of Materials (SBOM), providing insights into the components, their versions, and dependencies in a software application."
+---
-The `github_repository_sbom` table can be used to query information about packages listed in the SBOM of a repository.
+# Table: github_repository_sbom - Query GitHub Repositories using SQL
-**You must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Repositories is a feature offered by GitHub that allows developers to store and share their code, manage projects, and collaborate with other developers. It provides a platform for version control and source code management (SCM) functionalities of Git, along with its own features. GitHub Repositories enable developers to maintain a history of project files, track changes, revert to previous versions, and collaborate seamlessly with their team.
+
+## Table Usage Guide
+
+The `github_repository_sbom` table provides insights into the Software Bill of Materials (SBOM) of GitHub Repositories. As a software developer or security analyst, explore the components, their versions, and dependencies in a software application through this table. Utilize it to uncover information about the SBOM, such as the components used in a software application, their versions, and dependencies, which can be crucial for vulnerability management and software maintenance.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) column in the `where` or `join` clause to query the table.
## Examples
### List SBOM packages with a specific package version
+The query helps to identify software bill of materials (SBOM) packages within a specific GitHub repository that are using a specified version. This can be useful for maintaining version consistency or addressing potential vulnerabilities associated with certain versions.
-```sql
+```sql+postgres
select
spdx_id,
spdx_version,
@@ -23,9 +34,36 @@ where
and repository_full_name = 'turbot/steampipe';
```
+```sql+sqlite
+select
+ spdx_id,
+ spdx_version,
+ json_extract(p.value, '$.name') as package_name,
+ json_extract(p.value, '$.versionInfo') as package_version,
+ json_extract(p.value, '$.licenseConcluded') as package_license
+from
+ github_repository_sbom,
+ json_each(packages) as p
+where
+ json_extract(p.value, '$.versionInfo') = '2.6.0'
+ and repository_full_name = 'turbot/steampipe';
+```
+
### Find SBOMs conforming to a specific SPDX version
+Analyze the settings to understand which Software Bill of Materials (SBOMs) align with a certain SPDX version in a given repository. This can help maintain compliance and compatibility with specific standards.
-```sql
+```sql+postgres
+select
+ name,
+ spdx_version
+from
+ github_repository_sbom
+where
+ spdx_version = '2.2'
+ and repository_full_name = 'turbot/steampipe';
+```
+
+```sql+sqlite
select
name,
spdx_version
@@ -37,8 +75,20 @@ where
```
### Retrieve SBOMs under a specific data license
+Explore which Software Bill of Materials (SBOMs) are under a specific data license in a particular repository. This can help in assessing compliance with licensing requirements and managing intellectual property rights.
+
+```sql+postgres
+select
+ name,
+ data_license
+from
+ github_repository_sbom
+where
+ data_license = 'CC0-1.0'
+ and repository_full_name = 'turbot/steampipe';
+```
-```sql
+```sql+sqlite
select
name,
data_license
@@ -50,8 +100,9 @@ where
```
### Find SBOMs created by a specific user or at a specific time
+Determine the software bill of materials (SBOMs) created by a specific individual or at a certain date. This is useful for tracking changes and understanding the history of your software development.
-```sql
+```sql+postgres
select
repository_full_name,
creation_info
@@ -60,4 +111,15 @@ from
where
(creation_info ->> 'created_by' = 'madhushreeray30' or creation_info ->> 'created_at' = '2023-11-16')
and repository_full_name = 'turbot/steampipe';
+```
+
+```sql+sqlite
+select
+ repository_full_name,
+ creation_info
+from
+ github_repository_sbom
+where
+ (json_extract(creation_info, '$.created_by') = 'madhushreeray30' or json_extract(creation_info, '$.created_at') = '2023-11-16')
+ and repository_full_name = 'turbot/steampipe';
```
\ No newline at end of file
diff --git a/docs/tables/github_repository_vulnerability_alert.md b/docs/tables/github_repository_vulnerability_alert.md
index 87e2914b..1cf12c04 100644
--- a/docs/tables/github_repository_vulnerability_alert.md
+++ b/docs/tables/github_repository_vulnerability_alert.md
@@ -1,14 +1,25 @@
-# Table: github_repository_vulnerability_alert
+---
+title: "Steampipe Table: github_repository_vulnerability_alert - Query GitHub Repository Vulnerability Alerts using SQL"
+description: "Allows users to query GitHub Repository Vulnerability Alerts, specifically the alert status, affected package name, and affected range, providing insights into repository security status and potential vulnerabilities."
+---
-The `github_repository_vulnerability_alert` table can be used to query information on vulnerability alerts from a repository.
+# Table: github_repository_vulnerability_alert - Query GitHub Repository Vulnerability Alerts using SQL
-**You must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Repository Vulnerability Alerts is a feature within GitHub that allows users to monitor and respond to security vulnerabilities in their repositories. It provides a centralized way to set up and manage alerts for various repositories, including package names, affected ranges, and alert statuses. GitHub Repository Vulnerability Alerts helps users stay informed about the security status of their repositories and take appropriate actions when potential vulnerabilities are detected.
+
+## Table Usage Guide
+
+The `github_repository_vulnerability_alert` table provides insights into repository vulnerability alerts within GitHub. As a security analyst, explore alert-specific details through this table, including alert status, affected package name, and affected range. Utilize it to uncover information about potential vulnerabilities, such as those with high severity, the affected versions of packages, and the verification of fixed versions.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) column in the `where` or `join` clause to query the table.
## Examples
### List vulnerability alerts
+This query helps to analyze the security vulnerabilities of a particular Github repository. It provides insights into the severity and description of each vulnerability, aiding in prioritizing and addressing security concerns effectively.
-```sql
+```sql+postgres
select
number,
created_at,
@@ -24,9 +35,26 @@ where
repository_full_name = 'turbot/steampipe';
```
+```sql+sqlite
+select
+ number,
+ created_at,
+ state,
+ json_extract(json_extract(security_advisory, '$.cvss'), '$.score') as cvss_score,
+ json_extract(security_advisory, '$.description') as description,
+ severity,
+ vulnerable_manifest_filename,
+ vulnerable_manifest_path
+from
+ github_repository_vulnerability_alert
+where
+ repository_full_name = 'turbot/steampipe';
+```
+
### List open vulnerability alerts
+The query aids in identifying active vulnerability alerts within a specific GitHub repository. This is useful for maintaining the security of the repository by addressing potential threats promptly.
-```sql
+```sql+postgres
select
number,
created_at,
@@ -43,9 +71,27 @@ where
and state = 'OPEN';
```
+```sql+sqlite
+select
+ number,
+ created_at,
+ state,
+ json_extract(security_advisory, '$.cvss.score') as cvss_score,
+ json_extract(security_advisory, '$.description') as description,
+ severity,
+ vulnerable_manifest_filename,
+ vulnerable_manifest_path
+from
+ github_repository_vulnerability_alert
+where
+ repository_full_name = 'turbot/steampipe'
+ and state = 'OPEN';
+```
+
### List open critical vulnerability alerts
+Identify critical security vulnerabilities in a specific GitHub repository that are currently open. This can help prioritize security efforts and address the most severe issues first.
-```sql
+```sql+postgres
select
number,
created_at,
@@ -61,4 +107,22 @@ where
repository_full_name = 'turbot/steampipe'
and state = 'OPEN'
and severity = 'CRITICAL';
+```
+
+```sql+sqlite
+select
+ number,
+ created_at,
+ state,
+ json_extract(json_extract(security_advisory, '$.cvss'), '$.score') as cvss_score,
+ json_extract(security_advisory, '$.description') as description,
+ severity,
+ vulnerable_manifest_filename,
+ vulnerable_manifest_path
+from
+ github_repository_vulnerability_alert
+where
+ repository_full_name = 'turbot/steampipe'
+ and state = 'OPEN'
+ and severity = 'CRITICAL';
```
\ No newline at end of file
diff --git a/docs/tables/github_search_code.md b/docs/tables/github_search_code.md
index 3c0aacb8..397ce499 100644
--- a/docs/tables/github_search_code.md
+++ b/docs/tables/github_search_code.md
@@ -1,14 +1,38 @@
-# Table: github_search_code
+---
+title: "Steampipe Table: github_search_code - Query GitHub Code using SQL"
+description: "Allows users to query Code in GitHub, specifically the details of the code files and their properties, providing insights into the codebase and its structure."
+---
-The `github_search_code` table helps to search for the specific item you want to find inside of a file. You can search globally across all of GitHub, or scope your search to a particular repository or organization.
+# Table: github_search_code - Query GitHub Code using SQL
- **You must always include at least one search term when searching source code** in the where or join clause using the `query` column. The `query` contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. See [Searching code](https://docs.github.com/search-github/searching-on-github/searching-code) for details on the GitHub query syntax.
+GitHub is a web-based hosting service for version control using Git. It is primarily used for computer code and offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, and wikis for every project.
+
+## Table Usage Guide
+
+The `github_search_code` table provides insights into the code files within GitHub repositories. As a developer or DevOps engineer, explore file-specific details through this table, including file names, paths, and associated metadata. Utilize it to uncover information about the codebase, such as the distribution of file types, the structure of the repositories, and the details of the code files.
+
+**Important Notes**
+- You must always include at least one search term when searching source code in the where or join clause using the `query` column. The `query` contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. See [Searching code](https://docs.github.com/search-github/searching-on-github/searching-code) for details on the GitHub query syntax.
## Examples
### List searched codes by file name
+Explore which codes have been searched by file name. This is useful for tracking the usage and relevance of certain codes within your organization's repository.
+
+```sql+postgres
+select
+ name,
+ query,
+ html_url,
+ repository_full_name,
+ sha
+from
+ github_search_code
+where
+ query = 'filename:table_github_my_organization RowsRemaining';
+```
-```sql
+```sql+sqlite
select
name,
query,
@@ -22,8 +46,21 @@ where
```
### List searched codes by file location
+Explore which codes have been searched by their file location on GitHub. This can be useful to understand the areas of interest or frequent search patterns within specific directories.
-```sql
+```sql+postgres
+select
+ name,
+ query,
+ html_url,
+ sha
+from
+ github_search_code
+where
+ query = 'github_rate_limit path:docs/tables';
+```
+
+```sql+sqlite
select
name,
query,
@@ -36,8 +73,21 @@ where
```
### List searched codes by extension
+Explore which codes have been searched by their extension to gain insights into commonly used or referenced codes in your GitHub projects. This can help in understanding code usage patterns and optimizing your project structure.
-```sql
+```sql+postgres
+select
+ name,
+ query,
+ html_url,
+ sha
+from
+ github_search_code
+where
+ query = 'github_rate_limit path:docs/tables extension:md';
+```
+
+```sql+sqlite
select
name,
query,
@@ -50,8 +100,21 @@ where
```
### List searched codes within organization's repositories
+Explore which codes within your organization's repositories have been searched. This can be useful in understanding the areas of interest and focus within your team's coding projects.
-```sql
+```sql+postgres
+select
+ name,
+ query,
+ html_url,
+ sha
+from
+ github_search_code
+where
+ query = 'github_stargazer org:turbot extension:go';
+```
+
+```sql+sqlite
select
name,
query,
@@ -64,8 +127,21 @@ where
```
### List searched codes within a user's repositories
+Explore which codes within a user's repositories have been searched for. This is handy for understanding which parts of your codebase are garnering attention and could potentially inform future development decisions.
+
+```sql+postgres
+select
+ name,
+ query,
+ html_url,
+ sha
+from
+ github_search_code
+where
+ query = 'Stargazers user:turbot extension:go';
+```
-```sql
+```sql+sqlite
select
name,
query,
@@ -78,8 +154,21 @@ where
```
### List searched codes within a user's specific repository
+Explore which codes have been searched within a specific user's repository. This is useful for identifying popular topics or areas of interest within a particular project.
-```sql
+```sql+postgres
+select
+ name,
+ query,
+ html_url,
+ sha
+from
+ github_search_code
+where
+ query = 'Stargazers repo:turbot/steampipe-plugin-github extension:go';
+```
+
+```sql+sqlite
select
name,
query,
@@ -92,8 +181,21 @@ where
```
### List searched codes by language
+Explore which codes have been searched by language on GitHub. This can be particularly useful for understanding the popularity and usage of different programming languages within a specific organization.
+
+```sql+postgres
+select
+ name,
+ query,
+ html_url,
+ sha
+from
+ github_search_code
+where
+ query = 'github_tag org:turbot language:markdown';
+```
-```sql
+```sql+sqlite
select
name,
query,
@@ -106,8 +208,21 @@ where
```
### List searched codes while file size is greater than 40 KB
+Explore which files in a particular organization on GitHub are larger than 40KB and written in Markdown. This can be useful for identifying potentially bloated files that may need to be optimized or split up.
-```sql
+```sql+postgres
+select
+ name,
+ query,
+ html_url,
+ sha
+from
+ github_search_code
+where
+ query = 'org:turbot size:>40000 language:markdown';
+```
+
+```sql+sqlite
select
name,
query,
@@ -120,8 +235,21 @@ where
```
### List searched codes by the file contents or file path
+Discover the segments that have been searched in GitHub by either file contents or file path. This can be beneficial in pinpointing the specific locations where certain codes are used, providing insights into code usage and organization.
-```sql
+```sql+postgres
+select
+ name,
+ query,
+ html_url,
+ sha
+from
+ github_search_code
+where
+ query = 'Stargazers org:turbot in:file,path extension:go';
+```
+
+```sql+sqlite
select
name,
query,
@@ -134,8 +262,9 @@ where
```
### List text match details
+This query is used to explore the details of text matches in a GitHub code search. It's useful for identifying instances where specific text, such as a filename or property, appears in your organization's codebase.
-```sql
+```sql+postgres
select
name,
jsonb_pretty(match -> 'matches') as matches,
@@ -150,9 +279,25 @@ where
query = 'filename:table_github_my_organization RowsRemaining';
```
+```sql+sqlite
+select
+ name,
+ match.value as matches,
+ json_extract(match.value, '$.fragment') as fragment,
+ json_extract(match.value, '$.property') as property,
+ json_extract(match.value, '$.object_url') as object_url,
+ json_extract(match.value, '$.object_type') as object_type
+from
+ github_search_code,
+ json_each(text_matches) as match
+where
+ query = 'filename:table_github_my_organization RowsRemaining';
+```
+
### List repository details
+This query helps you to explore and understand the details of specific repositories within your organization on GitHub. It is particularly useful in identifying and analyzing the repositories that contain a specific file, thereby aiding in efficient file management and organization.
-```sql
+```sql+postgres
select
name,
repository -> 'id' as repo_id,
@@ -164,3 +309,16 @@ from
where
query = 'filename:table_github_my_organization RowsRemaining';
```
+
+```sql+sqlite
+select
+ name,
+ json_extract(repository, '$.id') as repo_id,
+ json_extract(repository, '$.name') as repo_name,
+ json_extract(repository, '$.url') as repo_url,
+ repository -> 'owner' as repo_owner
+from
+ github_search_code
+where
+ query = 'filename:table_github_my_organization RowsRemaining';
+```
\ No newline at end of file
diff --git a/docs/tables/github_search_commit.md b/docs/tables/github_search_commit.md
index 34a0560a..c59e06e5 100644
--- a/docs/tables/github_search_commit.md
+++ b/docs/tables/github_search_commit.md
@@ -1,14 +1,38 @@
-# Table: github_search_commit
+---
+title: "Steampipe Table: github_search_commit - Query GitHub Commits using SQL"
+description: "Allows users to query GitHub Commits, specifically providing the ability to search for commits across repositories based on specified criteria."
+---
-The `github_search_commit` table helps to find commits via various criteria on the default branch (usually master). You can search for commits globally across all of GitHub, or search for commits within a particular repository or organization.
+# Table: github_search_commit - Query GitHub Commits using SQL
- **You must always include at least one search term when searching source code** in the where or join clause using the `query` column. You can narrow the results using these commit search qualifiers in any combination. See [Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits) for details on the GitHub query syntax.
+GitHub Commits is a feature within the GitHub service that allows users to make changes to a repository. Each commit corresponds to a specific change made to the repository, and includes information about the author, the date of the commit, and an associated message describing the change. GitHub Commits form the core of GitHub's version control functionality.
+
+## Table Usage Guide
+
+The `github_search_commit` table enables insights into commit activities within GitHub repositories. As a developer or project manager, leverage this table to track changes, monitor project progress, and maintain version control. Utilize it to search for specific commits based on various criteria, such as author, date, and associated message.
+
+**Important Notes**
+- You must always include at least one search term when searching source code in the where or join clause using the `query` column. You can narrow the results using these commit search qualifiers in any combination. See [Searching commits](https://docs.github.com/search-github/searching-on-github/searching-commits) for details on the GitHub query syntax.
## Examples
### List searched commits within organization's repositories
+This query is useful for tracking specific changes or additions made within an organization's repositories, such as identifying when a certain table was added. It provides a way to monitor and review the evolution of the codebase, enhancing oversight and control over the development process.
-```sql
+```sql+postgres
+select
+ sha,
+ query,
+ html_url,
+ repository_full_name,
+ score
+from
+ github_search_commit
+where
+ query = 'Add table github_my_star org:turbot';
+```
+
+```sql+sqlite
select
sha,
query,
@@ -22,8 +46,21 @@ where
```
### List searched commits within a user's repositories
+Explore the specific commits in a user's GitHub repositories that match a particular search term. This is useful for tracking changes related to specific features or issues.
+
+```sql+postgres
+select
+ sha,
+ query,
+ html_url,
+ score
+from
+ github_search_commit
+where
+ query = 'Add table github_my_star user:turbot';
+```
-```sql
+```sql+sqlite
select
sha,
query,
@@ -36,8 +73,21 @@ where
```
### List searched commits within a user's specific repository
+Determine the areas in which specific changes have been made within a user's specific repository. This can be beneficial for tracking the development and modifications of a project over time.
-```sql
+```sql+postgres
+select
+ sha,
+ query,
+ html_url,
+ score
+from
+ github_search_commit
+where
+ query = 'Add table github_my_star repo:turbot/steampipe-plugin-github';
+```
+
+```sql+sqlite
select
sha,
query,
@@ -50,8 +100,21 @@ where
```
### List searched commits by author
+Explore which commits have been made by a specific author in a particular GitHub repository. This can be useful to understand an author's contribution history and impact on a project.
-```sql
+```sql+postgres
+select
+ sha,
+ query,
+ html_url,
+ score
+from
+ github_search_commit
+where
+ query = 'author:VincentHardouin repo:turbot/steampipe-plugin-github';
+```
+
+```sql+sqlite
select
sha,
query,
@@ -64,8 +127,21 @@ where
```
### List searched commits committed within the specified date range
+Explore specific commits made within a certain date range on the 'turbot/steampipe-plugin-github' repository. This can be useful for tracking project progress or reviewing changes made during a specific period.
-```sql
+```sql+postgres
+select
+ sha,
+ query,
+ html_url,
+ score
+from
+ github_search_commit
+where
+ query = 'committer-date:2021-11-16..2021-11-23 repo:turbot/steampipe-plugin-github';
+```
+
+```sql+sqlite
select
sha,
query,
@@ -78,8 +154,21 @@ where
```
### List searched commits by hash
+Explore the specific commits in a GitHub repository by searching for a particular hash. This is useful for tracking changes and understanding the history of a project.
-```sql
+```sql+postgres
+select
+ sha,
+ query,
+ html_url,
+ score
+from
+ github_search_commit
+where
+ query = 'hash:b0566eafb30e0595651c14a4c499b16e1c443767 repo:turbot/steampipe-plugin-github';
+```
+
+```sql+sqlite
select
sha,
query,
@@ -92,8 +181,21 @@ where
```
### List searched commits by parent
+Explore which commits on GitHub have a specific parent commit. This can be useful to track changes made in a project over time, understand the evolution of code, and identify the impact of a particular commit.
-```sql
+```sql+postgres
+select
+ sha,
+ query,
+ html_url,
+ score
+from
+ github_search_commit
+where
+ query = 'parent:b0566ea';
+```
+
+```sql+sqlite
select
sha,
query,
@@ -106,8 +208,21 @@ where
```
### List searched commits by merge commits
+Explore which commits have been merged into the 'turbot/steampipe-plugin-azure' repository. This can be useful in identifying the changes made to the repository and tracking the progress of the project.
+
+```sql+postgres
+select
+ sha,
+ query,
+ html_url,
+ score
+from
+ github_search_commit
+where
+ query = 'merge:true repo:turbot/steampipe-plugin-azure';
+```
-```sql
+```sql+sqlite
select
sha,
query,
@@ -120,8 +235,9 @@ where
```
### List repository details
+Explore the specifics of a GitHub repository, including its name, ID, and owner, by using this query. This is particularly useful for gaining insights into the repository's details without having to manually sift through GitHub's interface.
-```sql
+```sql+postgres
select
sha,
repository -> 'name' as repo_name,
@@ -133,3 +249,16 @@ from
where
query = 'hash:b0566eafb30e0595651c14a4c499b16e1c443767 repo:turbot/steampipe-plugin-github';
```
+
+```sql+sqlite
+select
+ sha,
+ json_extract(repository, '$.name') as repo_name,
+ json_extract(repository, '$.id') as repo_id,
+ json_extract(repository, '$.html_url') as repo_html_url,
+ repository -> 'owner' as repo_owner
+from
+ github_search_commit
+where
+ query = 'hash:b0566eafb30e0595651c14a4c499b16e1c443767 repo:turbot/steampipe-plugin-github';
+```
\ No newline at end of file
diff --git a/docs/tables/github_search_issue.md b/docs/tables/github_search_issue.md
index 6f5d09ac..e38fde26 100644
--- a/docs/tables/github_search_issue.md
+++ b/docs/tables/github_search_issue.md
@@ -1,14 +1,38 @@
-# Table: github_search_issue
+---
+title: "Steampipe Table: github_search_issue - Query GitHub Issues using SQL"
+description: "Allows users to query GitHub Issues, specifically to retrieve and analyze issue data related to any GitHub repository, providing insights into repository management and development activities."
+---
-The `github_search_issue` table helps to find issues by state and keyword. You can search for issues globally across all of GitHub, or search for issues within a particular organization.
+# Table: github_search_issue - Query GitHub Issues using SQL
- **You must always include at least one search term when searching source code** in the where or join clause using the `query` column. You can narrow the results using these search qualifiers in any combination. See [Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests) for details on the GitHub query syntax.
+GitHub Issues is a feature of GitHub, a web-based hosting service for version control, that allows users to track and manage tasks, enhancements, and bugs for projects. It provides a platform for collaboration, enabling developers to work together on projects from anywhere. GitHub Issues helps users stay informed about the progress and performance of their projects, and take appropriate actions when required.
+
+## Table Usage Guide
+
+The `github_search_issue` table provides insights into issues within GitHub repositories. As a project manager or developer, explore issue-specific details through this table, including status, assignees, labels, and associated metadata. Utilize it to uncover information about issues, such as those that are open, the assignees working on them, and the labels attached to them.
+
+**Important Notes**
+- You must always include at least one search term when searching source code in the where or join clause using the `query` column. You can narrow the results using these search qualifiers in any combination. See [Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests) for details on the GitHub query syntax.
## Examples
### List issues by the title, body, or comments
+Discover the segments that contain issues based on their title, body or comments. This can be beneficial for understanding and managing the issues more effectively.
+
+```sql+postgres
+select
+ title,
+ id,
+ state,
+ created_at,
+ url
+from
+ github_search_issue
+where
+ query = 'github_search_commit in:title in:body';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -22,8 +46,22 @@ where
```
### List issues in open state assigned to a specific user
+This query allows you to identify open issues assigned to a specific user within a particular GitHub repository. This is useful for monitoring a user's workload or tracking the progress of issue resolution.
+
+```sql+postgres
+select
+ title,
+ id,
+ state,
+ created_at,
+ url
+from
+ github_search_issue
+where
+ query = 'is:open assignee:c0d3r-arnab repo:turbot/steampipe-plugin-github';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -37,8 +75,22 @@ where
```
### List issues with public visibility assigned to a specific user
+Discover the segments that include public issues assigned to a specific user on GitHub. This can be useful to monitor the work of a specific developer or track public issues in a particular repository.
+
+```sql+postgres
+select
+ title,
+ id,
+ state,
+ created_at,
+ url
+from
+ github_search_issue
+where
+ query = 'is:public assignee:c0d3r-arnab repo:turbot/steampipe-plugin-github';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -52,8 +104,22 @@ where
```
### List issues not linked to a pull request
+Determine the areas in which active issues exist that are not linked to any pull request in the GitHub repository for the Steampipe plugin. This is useful to identify potential tasks that may need attention or further investigation.
+
+```sql+postgres
+select
+ title,
+ id,
+ state,
+ created_at,
+ url
+from
+ github_search_issue
+where
+ query = 'is:open -linked:pr repo:turbot/steampipe-plugin-github';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -67,8 +133,22 @@ where
```
### List blocked issues
+Identify instances where issues have been blocked in the 'turbot/steampipe-plugin-github' repository. This can help in understanding project bottlenecks and prioritizing tasks.
+
+```sql+postgres
+select
+ title,
+ id,
+ state,
+ created_at,
+ url
+from
+ github_search_issue
+where
+ query = 'label:blocked repo:turbot/steampipe-plugin-github';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -82,8 +162,23 @@ where
```
### List issues with over 10 comments
+Identify instances where GitHub issues in the Turbot organization have garnered more than 10 comments. This is useful for tracking popular discussions and understanding the issues that are generating significant community engagement.
+
+```sql+postgres
+select
+ title,
+ id,
+ comments_total_count,
+ state,
+ created_at,
+ url
+from
+ github_search_issue
+where
+ query = 'org:turbot comments:>10';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -98,8 +193,9 @@ where
```
### List issues that took more than 30 days to close
+Discover the segments that took over a month to resolve within a specific organization. This allows for an analysis of efficiency in issue resolution and can highlight areas for improvement in the workflow process.
-```sql
+```sql+postgres
select
title,
id,
@@ -113,3 +209,18 @@ where
query = 'org:turbot state:closed'
and closed_at > (created_at + interval '30' day);
```
+
+```sql+sqlite
+select
+ title,
+ id,
+ state,
+ created_at,
+ closed_at,
+ url
+from
+ github_search_issue
+where
+ query = 'org:turbot state:closed'
+ and closed_at > datetime(created_at, '+30 day');
+```
\ No newline at end of file
diff --git a/docs/tables/github_search_label.md b/docs/tables/github_search_label.md
index 417d605c..cdafe35e 100644
--- a/docs/tables/github_search_label.md
+++ b/docs/tables/github_search_label.md
@@ -1,14 +1,38 @@
-# Table: github_search_label
+---
+title: "Steampipe Table: github_search_label - Query GitHub Labels using SQL"
+description: "Allows users to query Labels in GitHub, specifically the metadata and details of labels that exist within a repository."
+---
-The `github_search_label` table helps to find labels in a repository with names or descriptions that match search keywords.
+# Table: github_search_label - Query GitHub Labels using SQL
- **You must always include at least one search term and repository ID when searching source code** in the where or join clause using the `query` and `repository_id` columns respectively.
+GitHub Labels are a feature within GitHub that allows users to categorize and filter issues and pull requests. They are customizable and can be used in a variety of ways, including to indicate priority, type of work, or status. Labels are a powerful tool for managing work and communicating about issues and pull requests across the team.
+
+## Table Usage Guide
+
+The `github_search_label` table provides insights into Labels within GitHub. As a project manager or developer, explore label-specific details through this table, including color, default status, and associated metadata. Utilize it to uncover information about labels, such as their usage across issues and pull requests, and to facilitate efficient project management and issue tracking.
+
+**Important Notes**
+- You must always include at least one search term and repository ID when searching source code in the where or join clause using the `query` and `repository_id` columns respectively.
## Examples
### List labels for bug, enhancement and blocked
+Determine the areas in which specific labels such as 'bug', 'enhancement', and 'blocked' are used within a particular GitHub repository. This allows for a better understanding of issue categorization and priority setting within the project.
-```sql
+```sql+postgres
+select
+ id,
+ repository_id,
+ name,
+ repository_full_name,
+ description
+from
+ github_search_label
+where
+ repository_id = 331646306 and query = 'bug enhancement blocked';
+```
+
+```sql+sqlite
select
id,
repository_id,
@@ -22,8 +46,9 @@ where
```
### List labels where specific text matches in name or description
+Determine the areas in which specific text matches in labels' name or description within a particular GitHub repository. This can be used to quickly locate and organize labels related to a specific topic or task.
-```sql
+```sql+postgres
select
id,
repository_id,
@@ -34,3 +59,15 @@ from
where
repository_id = 331646306 and query = 'work';
```
+
+```sql+sqlite
+select
+ id,
+ repository_id,
+ name,
+ description
+from
+ github_search_label
+where
+ repository_id = 331646306 and query = 'work';
+```
\ No newline at end of file
diff --git a/docs/tables/github_search_pull_request.md b/docs/tables/github_search_pull_request.md
index 6edffa8b..5628cddf 100644
--- a/docs/tables/github_search_pull_request.md
+++ b/docs/tables/github_search_pull_request.md
@@ -1,14 +1,39 @@
-# Table: github_search_pull_request
+---
+title: "Steampipe Table: github_search_pull_request - Query GitHub Pull Requests using SQL"
+description: "Allows users to query GitHub Pull Requests. This table provides extensive details about pull requests across repositories, including the status, creator, and assignee information."
+---
-The `github_search_pull_request` table helps to find pull requests by state and keyword. You can search for pull requests globally across all of GitHub, or search for pull requests within a particular organization.
+# Table: github_search_pull_request - Query GitHub Pull Requests using SQL
- **You must always include at least one search term when searching source code** in the where or join clause using the `query` column. You can narrow the results using these search qualifiers in any combination. See [Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests) for details on the GitHub query syntax.
+GitHub Pull Requests is a feature within GitHub that allows developers to propose changes to a repository. It provides a platform for code review and discussion about the proposed changes before they are merged into the codebase. GitHub Pull Requests helps in maintaining the integrity and quality of the code in a repository by ensuring that all changes are reviewed and approved before they are incorporated.
+
+## Table Usage Guide
+
+The `github_search_pull_request` table provides insights into pull requests within GitHub. As a developer or project manager, explore pull request-specific details through this table, including status, creator, assignee, and associated metadata. Utilize it to monitor the progress of proposed changes, manage code reviews, and ensure the quality of the code in your repositories.
+
+**Important Notes**
+- You must always include at least one search term when searching pull requests in the where or join clause using the `query` column. You can narrow the results using these search qualifiers in any combination. See [Searching issues and pull requests](https://docs.github.com/search-github/searching-on-github/searching-issues-and-pull-requests) for details on the GitHub query syntax.
## Examples
### List pull requests by the title, body, or comments
+Explore which GitHub pull requests match certain criteria within the title, body, or comments. This can be useful for identifying relevant discussions or changes related to specific topics or keywords.
+
+```sql+postgres
+select
+ title,
+ id,
+ state,
+ created_at,
+ repository_full_name,
+ url
+from
+ github_search_pull_request
+where
+ query = 'github_search_issue in:title in:body in:comments';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -23,8 +48,22 @@ where
```
### List pull requests in open state assigned to a specific user
+Determine the areas in which a specific user has been assigned open pull requests for a particular repository. This is useful for project managers to track individual contributions and progress in a collaborative environment.
+
+```sql+postgres
+select
+ title,
+ id,
+ state,
+ created_at,
+ url
+from
+ github_search_pull_request
+where
+ query = 'is:open assignee:c0d3r-arnab repo:turbot/steampipe-plugin-github';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -38,8 +77,22 @@ where
```
### List pull requests with public visibility assigned to a specific user
+Determine the areas in which a specific user has been assigned public visibility pull requests in a particular GitHub repository. This can be useful to track a user's involvement and contribution to publicly visible projects.
+
+```sql+postgres
+select
+ title,
+ id,
+ state,
+ created_at,
+ url
+from
+ github_search_pull_request
+where
+ query = 'is:public assignee:c0d3r-arnab repo:turbot/steampipe-plugin-github';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -53,8 +106,22 @@ where
```
### List pull requests not linked to an issue
+Identify instances where open pull requests are not linked to an issue within the 'turbot/steampipe-plugin-github' repository. This can help to uncover potential oversights in issue tracking and ensure all code changes are properly documented.
+
+```sql+postgres
+select
+ title,
+ id,
+ state,
+ created_at,
+ url
+from
+ github_search_pull_request
+where
+ query = 'is:open -linked:issue repo:turbot/steampipe-plugin-github';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -68,12 +135,27 @@ where
```
### List pull requests with over 50 comments
+Determine the areas in which pull requests have sparked significant discussion, by identifying those with over 50 comments. This can provide insights into contentious or complex issues within your organization's GitHub repositories.
+
+```sql+postgres
+select
+ title,
+ id,
+ total_comments_count,
+ state,
+ created_at,
+ url
+from
+ github_search_pull_request
+where
+ query = 'org:turbot comments:>50';
+```
-```sql
+```sql+sqlite
select
title,
id,
- comments,
+ total_comments_count,
state,
created_at,
url
@@ -84,8 +166,22 @@ where
```
### List open draft pull requests
+Explore the open draft pull requests in your GitHub organization. This could be used to identify unfinished work and help prioritize tasks for your development team.
+
+```sql+postgres
+select
+ title,
+ id,
+ state,
+ created_at,
+ url
+from
+ github_search_pull_request
+where
+ query = 'org:turbot draft:true state:open';
+```
-```sql
+```sql+sqlite
select
title,
id,
@@ -99,8 +195,9 @@ where
```
### List pull requests that took more than 30 days to close
+Determine the areas in which pull requests have taken more than a month to close. This can help in identifying bottlenecks in the code review process and provide insights for improving efficiency.
-```sql
+```sql+postgres
select
title,
id,
@@ -114,3 +211,18 @@ where
query = 'org:turbot state:closed'
and closed_at > (created_at + interval '30' day);
```
+
+```sql+sqlite
+select
+ title,
+ id,
+ state,
+ created_at,
+ closed_at,
+ url
+from
+ github_search_pull_request
+where
+ query = 'org:turbot state:closed'
+ and closed_at > datetime(created_at, '+30 days');
+```
\ No newline at end of file
diff --git a/docs/tables/github_search_repository.md b/docs/tables/github_search_repository.md
index 00ee891d..022193ac 100644
--- a/docs/tables/github_search_repository.md
+++ b/docs/tables/github_search_repository.md
@@ -1,23 +1,48 @@
-# Table: github_search_repository
+---
+title: "Steampipe Table: github_search_repository - Query GitHub Repositories using SQL"
+description: "Allows users to query GitHub Repositories based on specific search criteria, providing insights into repository details such as name, owner, description, and more."
+---
-The `github_search_repository` table helps to find repositories via various criteria. You can search for repositories on GitHub and narrow the results using these repository search qualifiers in any combination.
+# Table: github_search_repository - Query GitHub Repositories using SQL
- **You must always include at least one search term when searching source code** in the where or join clause using the `query` column. You can search for repositories globally across all of GitHub.com, or search for repositories within a particular organization. See [Searching for repositories](https://docs.github.com/search-github/searching-on-github/searching-for-repositories) for details on the GitHub query syntax.
+GitHub Repositories represent a location where all the files for a project are stored. Each project corresponds to one repository. Repositories can contain folders and files, images, videos, spreadsheets, and data sets - anything your project needs.
+## Table Usage Guide
+
+The `github_search_repository` table provides insights into repositories within GitHub. As a developer or project manager, explore repository-specific details through this table, including owner, name, description, and more. Utilize it to uncover information about repositories, such as those with specific topics, languages, or other search criteria, and to manage and organize your project's files and resources.
+
+**Important Notes**
+- You must always include at least one search term when searching repositories in the where or join clause using the `query` column. You can search for repositories globally across all of GitHub.com, or search for repositories within a particular organization. See [Searching for repositories](https://docs.github.com/search-github/searching-on-github/searching-for-repositories) for details on the GitHub query syntax.
## Examples
### Get a specific repository
+Identify specific details about a given repository, such as the owner, language used, and various user interaction metrics. This can be useful for understanding the popularity and reach of a repository within the GitHub community.
-```sql
+```sql+postgres
select
name,
owner_login,
- language,
- forks_count,
- stargazers_count,
+ primary_language,
+ fork_count,
+ stargazer_count,
subscribers_count,
- watchers_count
+ watchers_total_count
+from
+ github_search_repository
+where
+ query = 'repo:turbot/steampipe-plugin-github';
+```
+
+```sql+sqlite
+select
+ name,
+ owner_login,
+ primary_language,
+ fork_count,
+ stargazer_count,
+ subscribers_count,
+ watchers_total_count
from
github_search_repository
where
@@ -25,16 +50,32 @@ where
```
### List repositories based on contents of a repository
+Discover the segments that are popular among users by identifying repositories based on the content of a specific repository. This can help in understanding user preferences and trends in the open-source community.
-```sql
+```sql+postgres
select
name,
owner_login,
- language,
- forks_count,
- stargazers_count,
+ primary_language,
+ fork_count,
+ stargazer_count,
subscribers_count,
- watchers_count
+ watchers_total_count
+from
+ github_search_repository
+where
+ query = 'stargazers in:readme repo:turbot/steampipe-plugin-github';
+```
+
+```sql+sqlite
+select
+ name,
+ owner_login,
+ primary_language,
+ fork_count,
+ stargazer_count,
+ subscribers_count,
+ watchers_total_count
from
github_search_repository
where
@@ -42,16 +83,32 @@ where
```
### List repositories with more than 100000 followers
+Determine the areas in which popular repositories on GitHub have amassed a large following. This query is useful for identifying trends and patterns among the most followed repositories, offering insights into what makes a repository popular.
+
+```sql+postgres
+select
+ name,
+ owner_login,
+ primary_language,
+ fork_count,
+ stargazer_count,
+ subscribers_count,
+ watchers_total_count
+from
+ github_search_repository
+where
+ query = 'followers:>=100000';
+```
-```sql
+```sql+sqlite
select
name,
owner_login,
- language,
- forks_count,
- stargazers_count,
+ primary_language,
+ fork_count,
+ stargazer_count,
subscribers_count,
- watchers_count
+ watchers_total_count
from
github_search_repository
where
@@ -59,18 +116,34 @@ where
```
### List forked repositories created within specific timestamp
+Discover the segments that have forked a specific repository within a particular time frame. This can be particularly useful for understanding the popularity and reach of a project during that period.
-```sql
+```sql+postgres
select
name,
owner_login,
- language,
- forks_count,
- stargazers_count,
+ primary_language,
+ fork_count,
+ stargazer_count,
subscribers_count,
- watchers_count
+ watchers_total_count
from
github_search_repository
where
query = 'tinyspotifyr in:name created:2021-01-01..2021-01-05 fork:only';
```
+
+```sql+sqlite
+select
+ name,
+ owner_login,
+ primary_language,
+ fork_count,
+ stargazer_count,
+ subscribers_count,
+ watchers_total_count
+from
+ github_search_repository
+where
+ query = 'tinyspotifyr in:name created:2021-01-01..2021-01-05 fork:only';
+```
\ No newline at end of file
diff --git a/docs/tables/github_search_topic.md b/docs/tables/github_search_topic.md
index d1f5a91b..4cecde05 100644
--- a/docs/tables/github_search_topic.md
+++ b/docs/tables/github_search_topic.md
@@ -1,14 +1,36 @@
-# Table: github_search_topic
+---
+title: "Steampipe Table: github_search_topic - Query GitHub Topics using SQL"
+description: "Allows users to query Topics on GitHub, specifically to find repositories associated with a specific topic, providing insights into the popularity and usage of certain topics across repositories."
+---
-The `github_search_topic` table helps to find topics via various criteria. You can search for topics on GitHub, explore related topics, and see how many repositories are associated with a certain topic.
+# Table: github_search_topic - Query GitHub Topics using SQL
- **You must always include at least one search term when searching source code** in the where or join clause using the `query` column. See [Searching topics](https://docs.github.com/search-github/searching-on-github/searching-topics) for details on the GitHub query syntax.
+GitHub Topics is a feature that allows users to explore repositories by technology, industry, and more. It helps developers to discover projects, learn from their peers, and better understand the landscape of possibilities within the platform. Topics are labels that repository owners can use to categorize their projects, so they're more discoverable.
+
+## Table Usage Guide
+
+The `github_search_topic` table provides insights into topics within GitHub. As a developer or project manager, explore topic-specific details through this table, including associated repositories, the number of stars, and the language used. Utilize it to uncover information about popular topics, the repositories that use them, and the overall popularity of different technologies and industries.
+
+**Important Notes**
+- You must always include at least one search term when searching topics in the where or join clause using the `query` column. See [Searching topics](https://docs.github.com/search-github/searching-on-github/searching-topics) for details on the GitHub query syntax.
## Examples
### List topics that are not curated
+Identify topics that lack curation within a specific GitHub repository. This is useful for maintaining content quality and relevance by pinpointing areas needing further attention.
-```sql
+```sql+postgres
+select
+ name,
+ created_at,
+ curated
+from
+ github_search_topic
+where
+ query = 'target-searching is:not-curated repo:turbot/steampipe-plugin-github';
+```
+
+```sql+sqlite
select
name,
created_at,
@@ -20,8 +42,20 @@ where
```
### List featured topics
+Explore which topics have been highlighted on the GitHub repository for the Steampipe GitHub plugin. This can be useful for understanding what areas of the plugin are being emphasized or promoted.
+
+```sql+postgres
+select
+ name,
+ created_at,
+ featured
+from
+ github_search_topic
+where
+ query = 'markdown is:featured repo:turbot/steampipe-plugin-github';
+```
-```sql
+```sql+sqlite
select
name,
created_at,
@@ -33,8 +67,22 @@ where
```
### List topics that have more than 5000 repositories
+Determine the areas in which popular topics on GitHub exceed 5000 repositories, providing insights into the most widely-used topics and enabling a focus on areas of high activity for potential collaboration or learning opportunities.
-```sql
+```sql+postgres
+select
+ name,
+ created_at,
+ created_by,
+ featured,
+ curated
+from
+ github_search_topic
+where
+ query = 'repositories:>5000 react-redux';
+```
+
+```sql+sqlite
select
name,
created_at,
@@ -48,8 +96,9 @@ where
```
### List topics that were created after a specific timestamp
+Discover the segments that have been established after a certain date, specifically within the context of react-redux. This is useful for tracking the evolution and growth of react-redux related topics over time.
-```sql
+```sql+postgres
select
name,
created_at,
@@ -61,3 +110,16 @@ from
where
query = 'created:>2021-01-01 react-redux';
```
+
+```sql+sqlite
+select
+ name,
+ created_at,
+ created_by,
+ featured,
+ curated
+from
+ github_search_topic
+where
+ query = 'created:>2021-01-01 react-redux';
+```
\ No newline at end of file
diff --git a/docs/tables/github_search_user.md b/docs/tables/github_search_user.md
index 10665e7f..18ca6604 100644
--- a/docs/tables/github_search_user.md
+++ b/docs/tables/github_search_user.md
@@ -1,14 +1,37 @@
-# Table: github_search_user
+---
+title: "Steampipe Table: github_search_user - Query GitHub Users using SQL"
+description: "Allows users to query GitHub Users, specifically the user's login name, type, score, and other details, providing insights into user activity and profile information."
+---
-The `github_search_user` table helps to find users and organizations via various criteria. You can filter your search to the personal user or organization account name with `user` or `org` qualifiers.
+# Table: github_search_user - Query GitHub Users using SQL
- **You must always include at least one search term when searching source code** in the where or join clause using the `query` column. See [Searching users](https://docs.github.com/search-github/searching-on-github/searching-users) for details on the GitHub query syntax.
+GitHub Users is a resource within GitHub that represents an individual or organization account. It holds information about the user's profile, including login name, type, and other details. GitHub Users provide a way to interact with the user's repositories, gists, followers, and more.
+
+## Table Usage Guide
+
+The `github_search_user` table provides insights into user profiles within GitHub. As a developer or a security analyst, explore user-specific details through this table, including login name, type, and score. Utilize it to uncover information about users, such as their activity, repositories they have access to, and their general profile information.
+
+**Important Notes**
+- You must always include at least one search term when searching users in the where or join clause using the `query` column. See [Searching users](https://docs.github.com/search-github/searching-on-github/searching-users) for details on the GitHub query syntax.
## Examples
### List users
+Identify instances where users have 'turbot' in their name within GitHub. This can help you find specific user profiles related to 'turbot' for further analysis or contact.
-```sql
+```sql+postgres
+select
+ id,
+ login,
+ type,
+ url
+from
+ github_search_user
+where
+ query = 'turbot in:name type:user';
+```
+
+```sql+sqlite
select
id,
login,
@@ -21,8 +44,21 @@ where
```
### List organizations
+Determine the areas in which specific organizations are operating by exploring their login details and types. This is useful in understanding the organizations' online presence and their categorization.
-```sql
+```sql+postgres
+select
+ id,
+ login,
+ type,
+ url
+from
+ github_search_user
+where
+ query = 'turbotio in:login type:org';
+```
+
+```sql+sqlite
select
id,
login,
@@ -35,8 +71,21 @@ where
```
### Get user with specific username
+Explore which GitHub user corresponds to a specific username. This is useful for finding detailed information about a particular user, such as their unique ID, login type, and URL.
-```sql
+```sql+postgres
+select
+ id,
+ login,
+ type,
+ url
+from
+ github_search_user
+where
+ query = 'user:c0d3r-arnab';
+```
+
+```sql+sqlite
select
id,
login,
@@ -49,8 +98,21 @@ where
```
### List organizations with over 10000 repositories
+This query is useful for identifying large-scale organizations on GitHub, specifically those that have more than 10,000 repositories. It can be used to understand the scale of open-source contributions or to target potential collaborations with prolific organizations.
+
+```sql+postgres
+select
+ id,
+ login,
+ type,
+ url
+from
+ github_search_user
+where
+ query = 'repos:>10000 type:org';
+```
-```sql
+```sql+sqlite
select
id,
login,
@@ -63,8 +125,9 @@ where
```
### List users and organizations created between specific timestamp
+Discover the segments that were added to your GitHub user base within a specific timeframe. This can help you assess the growth and monitor the activity on your platform during that period.
-```sql
+```sql+postgres
select
id,
login,
@@ -75,3 +138,15 @@ from
where
query = 'created:2021-01-01..2021-01-31 turbot';
```
+
+```sql+sqlite
+select
+ id,
+ login,
+ type,
+ url
+from
+ github_search_user
+where
+ query = 'created:2021-01-01..2021-01-31 turbot';
+```
\ No newline at end of file
diff --git a/docs/tables/github_stargazer.md b/docs/tables/github_stargazer.md
index 91aaa165..7f3386ba 100644
--- a/docs/tables/github_stargazer.md
+++ b/docs/tables/github_stargazer.md
@@ -1,14 +1,37 @@
-# Table: github_stargazer
+---
+title: "Steampipe Table: github_stargazer - Query GitHub Stargazers using SQL"
+description: "Allows users to query GitHub Stargazers, specifically the users who have starred a particular repository, providing insights into user engagement and repository popularity."
+---
-Stargazers are users who have starred the repository.
+# Table: github_stargazer - Query GitHub Stargazers using SQL
-The `github_stargazer` table can be used to query stargazers belonging to a repository, and **you must specify which repository** with `where repository_full_name='owner/repository'`.
+GitHub Stargazers is a feature within GitHub that allows users to show appreciation to the repositories they find interesting. Users can star repositories to keep track of projects they find fascinating or useful. This feature provides a simple way to express interest in a project or to bookmark it for later reference.
+
+## Table Usage Guide
+
+The `github_stargazer` table provides insights into GitHub Stargazers within a specific repository. As a repository owner or collaborator, explore stargazer-specific details through this table, including user profiles, star creation timestamps, and associated metadata. Utilize it to uncover information about who is interested in your repository, when they starred it, and how your repository's popularity is growing over time.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) column in the `where` or `join` clause to query the table.
## Examples
### List the stargazers of a repository
+Discover who has shown interest in a specific Github repository and when, by identifying the users who have starred it and the time they did so. This can be useful for understanding the popularity and reach of the repository over time.
+
+```sql+postgres
+select
+ user_login,
+ starred_at
+from
+ github_stargazer
+where
+ repository_full_name = 'turbot/steampipe'
+order by
+ starred_at desc;
+```
-```sql
+```sql+sqlite
select
user_login,
starred_at
@@ -21,8 +44,9 @@ order by
```
### New stargazers by month
+Discover the popularity trend of the 'Steampipe' project on Github by counting new stargazers each month. This helps in understanding the project's growth and tracking its community engagement over time.
-```sql
+```sql+postgres
select
to_char(starred_at, 'YYYY-MM') as month,
count(*)
@@ -36,9 +60,24 @@ order by
month;
```
+```sql+sqlite
+select
+ strftime('%Y-%m', starred_at) as month,
+ count(*)
+from
+ github_stargazer
+where
+ repository_full_name = 'turbot/steampipe'
+group by
+ month
+order by
+ month;
+```
+
### List stargazers with their contact information
+Discover the segments that are actively showing interest in your GitHub repository by identifying users who have starred it and gathering their contact information. This can help in understanding your user base, facilitating community engagement or reaching out for feedback.
-```sql
+```sql+postgres
select
user_login,
starred_at,
@@ -57,3 +96,23 @@ where
order by
starred_at desc;
```
+
+```sql+sqlite
+select
+ user_login,
+ starred_at,
+ json_extract(user_detail, '$.name') as name,
+ json_extract(user_detail, '$.company') as company,
+ json_extract(user_detail, '$.email') as email,
+ json_extract(user_detail, '$.url') as url,
+ json_extract(user_detail, '$.twitter_username') as twitter_username,
+ json_extract(user_detail, '$.website_url') as website,
+ json_extract(user_detail, '$.location') as location,
+ json_extract(user_detail, '$.bio') as bio
+from
+ github_stargazer
+where
+ repository_full_name = 'turbot/steampipe-plugin-github'
+order by
+ starred_at desc;
+```
\ No newline at end of file
diff --git a/docs/tables/github_tag.md b/docs/tables/github_tag.md
index 0febb73e..95e5bee2 100644
--- a/docs/tables/github_tag.md
+++ b/docs/tables/github_tag.md
@@ -1,14 +1,25 @@
-# Table: github_tag
+---
+title: "Steampipe Table: github_tag - Query GitHub Tags using SQL"
+description: "Allows users to query Tags in GitHub, specifically the tag name, ID, commit details, and associated repository information, providing insights into version control and release management."
+---
-Tags mark specific commits in a repository history.
+# Table: github_tag - Query GitHub Tags using SQL
-The `github_tag` table can be used to query information about any tag, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+A GitHub Tag is a pointer to a specific commit in a repository, often used to capture a point in history that is used for a marked version release (i.e. v1.0.0). Tags are ref's that point to specific points in Git history. Tagging is generally used to capture a point in history that is used for a marked version release (i.e. v1.0.0).
+
+## Table Usage Guide
+
+The `github_tag` table provides insights into tags within GitHub repositories. As a developer or release manager, explore tag-specific details through this table, including commit details, tag name, and associated repository information. Utilize it to uncover information about tags, such as those associated with specific releases, the commit history of tags, and the management of version control.
+
+**Important Notes**
+- You must specify the `repository_full_name` (repository including org/user prefix) column in the `where` or `join` clause to query the table.
## Examples
### List tags
+Explore which versions of the 'turbot/steampipe' repository have been tagged on GitHub. This can be useful to understand the evolution of the project and identify specific versions for troubleshooting or reference.
-```sql
+```sql+postgres
select
name,
commit ->> 'sha' as commit_sha
@@ -18,9 +29,20 @@ where
repository_full_name = 'turbot/steampipe';
```
+```sql+sqlite
+select
+ name,
+ json_extract("commit", '$.sha') as commit_sha
+from
+ github_tag
+where
+ repository_full_name = 'turbot/steampipe';
+```
+
### Order tags by semantic version
+Discover the segments that are most relevant in the 'turbot/steampipe' repository by arranging tags in order of their semantic version. This can be helpful in understanding the progression and development of the project over time.
-```sql
+```sql+postgres
select
name,
commit ->> 'sha' as commit_sha
@@ -33,9 +55,14 @@ order by
name;
```
+```sql+sqlite
+Error: SQLite does not support string_to_array and regexp_replace functions.
+```
+
### Get commit details for each tag
+Explore the specifics of each commit for different tags in a GitHub repository. This can help in tracking changes, understanding authorship and verifying the validity of commits, which can be crucial for code review and version control.
-```sql
+```sql+postgres
select
name,
commit ->> 'sha' as commit_sha,
@@ -52,9 +79,33 @@ select
commit -> 'signature' ->> 'email' as commit_signature_email,
commit -> 'signature' -> 'signer' ->> 'login' as commit_signature_login,
commit ->> 'tarball_url' as tarball_url,
- commit ->> 'zipball_url' as zipball_url
+ commit ->> 'zipball_url' as zipball_url
from
github_tag
where
repository_full_name = 'turbot/steampipe';
```
+
+```sql+sqlite
+select
+ name,
+ json_extract(commit, '$.sha') as commit_sha,
+ json_extract(commit, '$.message') as commit_message,
+ json_extract(commit, '$.url') as commit_url,
+ json_extract(commit, '$.author.user.login') as author,
+ json_extract(commit, '$.authored_date') as authored_date,
+ json_extract(commit, '$.committer.user.login') as committer,
+ json_extract(commit, '$.committed_date') as committed_date,
+ json_extract(commit, '$.additions') as additions,
+ json_extract(commit, '$.deletions') as deletions,
+ json_extract(commit, '$.changed_files') as changed_files,
+ json_extract(commit, '$.signature.is_valid') as commit_signed,
+ json_extract(commit, '$.signature.email') as commit_signature_email,
+ json_extract(commit, '$.signature.signer.login') as commit_signature_login,
+ json_extract(commit, '$.tarball_url') as tarball_url,
+ json_extract(commit, '$.zipball_url') as zipball_url
+from
+ github_tag
+where
+ repository_full_name = 'turbot/steampipe';
+```
\ No newline at end of file
diff --git a/docs/tables/github_team.md b/docs/tables/github_team.md
index b2584bc5..9e5d43bd 100644
--- a/docs/tables/github_team.md
+++ b/docs/tables/github_team.md
@@ -1,26 +1,49 @@
-# Table: github_team
+---
+title: "Steampipe Table: github_team - Query GitHub Teams using SQL"
+description: "Allows users to query GitHub Teams, specifically providing details about each team within a GitHub organization. This information includes team ID, name, description, privacy level, and more."
+---
-Teams are groups of organization members that reflect your company or group's structure with cascading access permissions and mentions. The `github_team` table lists all teams you have visibility to across your organizations.
+# Table: github_team - Query GitHub Teams using SQL
-To list the teams that you're a member of across your organizations, use the `github_my_team` table.
+GitHub Teams is a feature within GitHub that allows organizations to create teams, manage permissions, and simplify @mentions. Teams are groups of organization members that reflect the company or project's structure. They can be used to create nested teams, mentionable as a single unit, and provide a social graph of an organization's repo permissions.
+
+## Table Usage Guide
+
+The `github_team` table provides insights into the teams within GitHub organizations. As a project manager or team lead, you can explore team-specific details through this table, including team ID, name, description, and privacy level. Utilize it to manage permissions, simplify @mentions, and understand the social graph of your organization's repo permissions.
## Examples
### List all visible teams
+Explore which teams are visible on your GitHub account, including details like their privacy settings and descriptions, to better manage your collaborations and understand team dynamics.
+
+```sql+postgres
+select
+ name,
+ slug,
+ privacy,
+ description
+from
+ github_team
+where
+ organization = 'turbot';
+```
-```sql
+```sql+sqlite
select
name,
slug,
privacy,
description
from
- github_team;
+ github_team
+where
+ organization = 'turbot';
```
### List all visible teams in an organization
+Explore which teams are publicly visible within a specific organization on GitHub. This is useful for understanding the structure and privacy settings of your organization's teams.
-```sql
+```sql+postgres
select
name,
slug,
@@ -29,12 +52,25 @@ select
from
github_team
where
- organization = 'my_org';
+ organization = 'turbot';
+```
+
+```sql+sqlite
+select
+ name,
+ slug,
+ privacy,
+ description
+from
+ github_team
+where
+ organization = 'turbot';
```
### Get the number of members for a single team
+Explore the size of a specific team within your organization on Github. This can be useful for resource allocation and understanding team dynamics.
-```sql
+```sql+postgres
select
name,
slug,
@@ -43,13 +79,25 @@ from
github_team
where
organization = 'my_org'
-and
- slug = 'my_team';
+ and slug = 'my_team';
+```
+
+```sql+sqlite
+select
+ name,
+ slug,
+ members_total_count
+from
+ github_team
+where
+ organization = 'my_org'
+ and slug = 'my_team';
```
### Get the number of repositories for a single team
+Determine the total number of repositories associated with a specific team within your organization. This can be useful for understanding the team's workload or for assessing the distribution of resources within the organization.
-```sql
+```sql+postgres
select
name,
slug,
@@ -58,28 +106,68 @@ from
github_team
where
organization = 'my_org'
-and
- slug = 'my_team';
+ and slug = 'my_team';
+```
+
+```sql+sqlite
+select
+ name,
+ slug,
+ repositories_total_count
+from
+ github_team
+where
+ organization = 'my_org'
+ and slug = 'my_team';
```
### Get parent team details for child teams
+Determine the hierarchical relationships within your organization's teams on Github. This query is useful for understanding team structures and identifying which teams are sub-teams of larger, parent teams.
+
+```sql+postgres
+select
+ slug,
+ organization,
+ parent_team ->> 'id' as parent_team_id,
+ parent_team ->> 'node_id' as parent_team_node_id,
+ parent_team ->> 'slug' as parent_team_slug
+from
+ github_team
+where
+ organization = 'turbot'
+ and parent_team is not null;
+```
-```sql
+```sql+sqlite
select
slug,
organization,
- parent ->> 'id' as parent_team_id,
- parent ->> 'node_id' as parent_team_node_id,
- parent ->> 'slug' as parent_team_slug
+ parent_team ->> 'id' as parent_team_id,
+ parent_team ->> 'node_id' as parent_team_node_id,
+ parent_team ->> 'slug' as parent_team_slug
from
github_team
where
- parent is not null;
+ organization = 'turbot'
+ and parent_team is not null;
```
### List teams with pending user invitations
+Identify teams that have outstanding invitations to users. This can help manage and expedite the onboarding process by pinpointing where follow-ups may be needed.
+
+```sql+postgres
+select
+ name,
+ slug,
+ invitations_total_count
+from
+ github_team
+where
+ organization = 'turbot'
+ and invitations_total_count > 0;
+```
-```sql
+```sql+sqlite
select
name,
slug,
@@ -87,5 +175,6 @@ select
from
github_team
where
- invitations_count > 0;
+ organization = 'turbot'
+ and invitations_total_count > 0;
```
\ No newline at end of file
diff --git a/docs/tables/github_team_member.md b/docs/tables/github_team_member.md
index fb54083d..065dd821 100644
--- a/docs/tables/github_team_member.md
+++ b/docs/tables/github_team_member.md
@@ -1,12 +1,39 @@
-# Table: github_team_member
+---
+title: "Steampipe Table: github_team_member - Query GitHub Team Members using SQL"
+description: "Allows users to query GitHub Team Members, providing insights into team member's details and their roles in specific GitHub teams."
+---
-The `github_team_member` table can be used to query information about members of a team. **You must specify the organization and team slug** in the where or join clause (`where organization= AND slug=`, `join github_team_member on organization= AND slug=`).
+# Table: github_team_member - Query GitHub Team Members using SQL
+
+GitHub Team Members are part of GitHub's Team feature which allows users to organize and manage user groups within a repository. These Team Members can be assigned different roles and permissions within the team. This feature is part of GitHub's collaboration tools designed to facilitate project management and team coordination.
+
+## Table Usage Guide
+
+The `github_team_member` table provides insights into team members within GitHub. As a project manager or team lead, explore team member-specific details through this table, including their roles and permissions within teams. Utilize it to manage and coordinate your team effectively, ensuring that each team member has the appropriate permissions and roles for their tasks.
+
+**Important Notes**
+- You must specify the `organization` and `slug` columns in the `where` or `join` clause to query the table.
## Examples
### List team members for a specific team
+Explore which team members belong to a specific team in your organization. This is useful for understanding team composition and roles within your organization.
+
+```sql+postgres
+select
+ organization,
+ slug as team_slug,
+ login,
+ role,
+ status
+from
+ github_team_member
+where
+ organization = 'my_org'
+ and slug = 'my-team';
+```
-```sql
+```sql+sqlite
select
organization,
slug as team_slug,
@@ -17,13 +44,28 @@ from
github_team_member
where
organization = 'my_org'
-and
- slug = 'my-team';
+ and slug = 'my-team';
```
### List active team members with maintainer role for a specific team
+This query helps to identify active team members who hold the 'Maintainer' role within a specific team in your organization. It is useful for managing team roles and ensuring that every team has an active maintainer.
+
+```sql+postgres
+select
+ organization,
+ slug as team_slug,
+ login,
+ role,
+ status
+from
+ github_team_member
+where
+ organization = 'my_org'
+ and slug = 'my-team'
+ and role = 'MAINTAINER';
+```
-```sql
+```sql+sqlite
select
organization,
slug as team_slug,
@@ -34,15 +76,14 @@ from
github_team_member
where
organization = 'my_org'
-and
- slug = 'my-team'
-and
- role = 'MAINTAINER';
+ and slug = 'my-team'
+ and role = 'MAINTAINER';
```
### List team members with maintainer role for visible teams
+Discover the segments that consist of team members with a maintainer role in visible teams. This can be useful for understanding the distribution of roles within your organization's teams, particularly in identifying those who have the authority to manage team settings.
-```sql
+```sql+postgres
select
t.organization as organization,
t.name as team_name,
@@ -60,3 +101,20 @@ where
and t.slug = tm.slug
and tm.role = 'MAINTAINER';
```
+
+```sql+sqlite
+select
+ t.organization as organization,
+ t.name as team_name,
+ t.slug as team_slug,
+ t.privacy as team_privacy,
+ t.description as team_description,
+ tm.login as member_login,
+ tm.role as member_role,
+ tm.status as member_status
+from
+ github_team as t
+ join github_team_member as tm on t.organization = tm.organization and t.slug = tm.slug
+where
+ tm.role = 'MAINTAINER';
+```
\ No newline at end of file
diff --git a/docs/tables/github_team_repository.md b/docs/tables/github_team_repository.md
index e2538d18..c44340cd 100644
--- a/docs/tables/github_team_repository.md
+++ b/docs/tables/github_team_repository.md
@@ -1,16 +1,26 @@
-# Table: github_team_repository
+---
+title: "Steampipe Table: github_team_repository - Query GitHub Teams Repositories using SQL"
+description: "Allows users to query GitHub Teams Repositories, specifically the association between teams and repositories within a GitHub organization, providing insights into team access to specific repositories."
+---
-A repository contains all of your project's files and each file's revision history.
+# Table: github_team_repository - Query GitHub Teams Repositories using SQL
-The `github_team_repository` table can be used to query information about repositories that a team has access to. **You must specify the organization and team slug** in the where or join clause (`where organization= AND slug=`, `join github_team_repository on organization= AND slug=`).
+GitHub Teams Repositories represent the association between teams and repositories within a GitHub organization. Teams are groups of organization members that reflect the company or project structure in your organization. Repositories are where all your project files (including documentation) reside and teams can be granted access to these repositories.
-To list all **your** repositories use the `github_my_repository` table instead. To get information about **any** repository, use the `github_repository` table instead.
+## Table Usage Guide
+
+The `github_team_repository` table provides insights into the association between teams and repositories within a GitHub organization. As a project manager or team lead, explore team-specific access details through this table, including repository permissions and associated metadata. Utilize it to uncover information about team access to repositories, such as those with admin permissions, the relationship between teams and repositories, and the verification of access policies.
+
+**Important Notes**
+- You must specify the `organization` and `slug` columns in the `where` or `join` clause to query the table.
+- To list all your repositories use the `github_my_repository` table instead. To get information about any repository, use the `github_repository` table instead.
## Examples
### List a specific team's repositories
+This query is designed to help you gain insights into the details of a specific team's repositories within your organization on GitHub. It is useful for understanding the team's repository permissions, primary language, fork count, stargazer count, license information, and other relevant details, which can help in managing team resources and identifying areas for improvement.
-```sql
+```sql+postgres
select
organization,
slug as team_slug,
@@ -26,13 +36,32 @@ from
github_team_repository
where
organization = 'my_org'
-and
- slug = 'my-team';
+ and slug = 'my-team';
+```
+
+```sql+sqlite
+select
+ organization,
+ slug as team_slug,
+ name as team_name,
+ permission,
+ (primary_language ->> 'name') as language,
+ fork_count,
+ stargazer_count,
+ (license_info ->> 'spdx_id') as license,
+ description,
+ url
+from
+ github_team_repository
+where
+ organization = 'my_org'
+ and slug = 'my-team';
```
### List visible teams and repositories they have admin permissions to
+Explore the teams and associated repositories within your organization that have administrative permissions. This is useful to ensure appropriate access rights and maintain security within your GitHub organization.
-```sql
+```sql+postgres
select
organization,
slug as team_slug,
@@ -47,8 +76,25 @@ from
github_team_repository
where
organization = 'my_org'
-and
- slug = 'my-team'
-and
- permission = 'ADMIN';
+ and slug = 'my-team'
+ and permission = 'ADMIN';
```
+
+```sql+sqlite
+select
+ organization,
+ slug as team_slug,
+ name as name,
+ description,
+ permission,
+ is_fork,
+ is_private,
+ is_archived,
+ json_extract(primary_language, '$.name') as language
+from
+ github_team_repository
+where
+ organization = 'my_org'
+ and slug = 'my-team'
+ and permission = 'ADMIN';
+```
\ No newline at end of file
diff --git a/docs/tables/github_traffic_view_daily.md b/docs/tables/github_traffic_view_daily.md
index 25c60c52..bc13d96f 100644
--- a/docs/tables/github_traffic_view_daily.md
+++ b/docs/tables/github_traffic_view_daily.md
@@ -1,14 +1,25 @@
-# Table: github_traffic_view_daily
+---
+title: "Steampipe Table: github_traffic_view_daily - Query GitHub Traffic Views using SQL"
+description: "Allows users to query Traffic Views on GitHub, specifically the daily view count, providing insights into repository traffic patterns and potential anomalies."
+---
-Daily views to the repository over the last 14 days.
+# Table: github_traffic_view_daily - Query GitHub Traffic Views using SQL
-The `github_traffic_view_daily` table can be used to query information about any tag, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Traffic Views is a feature within GitHub that allows you to monitor and respond to traffic patterns across your repositories. It provides a centralized way to set up and monitor views for various GitHub repositories, including the number of visitors, unique visitors, and the number of views per day. GitHub Traffic Views helps you stay informed about the health and performance of your GitHub repositories and take appropriate actions when predefined conditions are met.
+
+## Table Usage Guide
+
+The `github_traffic_view_daily` table provides insights into daily repository views within GitHub. As a repository owner, explore view-specific details through this table, including the number of views, unique visitors, and the timestamp of the views. Utilize it to uncover information about views, such as those with high traffic, the peak times for views, and the verification of view patterns.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### List view statistics
+Explore the daily traffic statistics of the 'turbot/steampipe' repository to assess its popularity and unique visits. This can help you understand the reach and impact of your project over time.
-```sql
+```sql+postgres
select
timestamp,
count,
@@ -20,3 +31,16 @@ where
order by
timestamp;
```
+
+```sql+sqlite
+select
+ timestamp,
+ count,
+ uniques
+from
+ github_traffic_view_daily
+where
+ repository_full_name = 'turbot/steampipe'
+order by
+ timestamp;
+```
\ No newline at end of file
diff --git a/docs/tables/github_traffic_view_weekly.md b/docs/tables/github_traffic_view_weekly.md
index 3f7c1d01..4c2111f7 100644
--- a/docs/tables/github_traffic_view_weekly.md
+++ b/docs/tables/github_traffic_view_weekly.md
@@ -1,14 +1,25 @@
-# Table: github_traffic_view_weekly
+---
+title: "Steampipe Table: github_traffic_view_weekly - Query GitHub Traffic View Weekly using SQL"
+description: "Allows users to query weekly traffic views on GitHub, providing insights into repository visit patterns and potential trends."
+---
-Weekly views to the repository over the last 14 days.
+# Table: github_traffic_view_weekly - Query GitHub Traffic View Weekly using SQL
-The `github_traffic_view_weekly` table can be used to query information about any tag, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Weekly Traffic Views is a feature within GitHub that allows repository owners to monitor and understand the frequency and source of visits to their repositories. It provides a weekly summary of the number of views and unique visitors to a repository. This feature aids in understanding the popularity and reach of a repository over time.
+
+## Table Usage Guide
+
+The `github_traffic_view_weekly` table provides insights into weekly traffic views within GitHub. As a repository owner or contributor, explore weekly view details through this table, including the number of views, unique visitors, and timestamp of the views. Utilize it to uncover information about repository popularity, such as peak visit times, trending repositories, and the reach of your repository.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### List view statistics
+Explore the popularity and unique visitor count of the 'Steampipe' repository on Github over time. This can be beneficial in understanding the reach and impact of the project, helping to inform future development and marketing strategies.
-```sql
+```sql+postgres
select
timestamp,
count,
@@ -20,3 +31,16 @@ where
order by
timestamp;
```
+
+```sql+sqlite
+select
+ timestamp,
+ count,
+ uniques
+from
+ github_traffic_view_weekly
+where
+ repository_full_name = 'turbot/steampipe'
+order by
+ timestamp;
+```
\ No newline at end of file
diff --git a/docs/tables/github_tree.md b/docs/tables/github_tree.md
index cd6576af..aca58459 100644
--- a/docs/tables/github_tree.md
+++ b/docs/tables/github_tree.md
@@ -1,22 +1,40 @@
-# Table: github_tree
+---
+title: "Steampipe Table: github_tree - Query GitHub Repositories using SQL"
+description: "Allows users to query GitHub Repositories, specifically the tree structures, providing insights into the file and directory hierarchy of each repository."
+---
-A Git tree object creates the hierarchy between files in a Git repository. You
-can use the Git tree object to create the relationship between directories and
-the files they contain.
+# Table: github_tree - Query GitHub Repositories using SQL
-A single tree object contains one or more entries, each of which is the SHA-1
-hash of a blob or subtree with its associated mode, type, and filename.
+GitHub Repositories are a fundamental resource in GitHub. They allow users to host and manage their codebase, track changes, and collaborate with other users. Each repository contains a tree structure that represents the file and directory hierarchy.
-The `github_tree` table can be used to query information about any tree, and
-**you must specify which repository and tree SHA** in the where or join clause
-using the `repository_full_name` and `tree_sha` columns. By default, recursive
-entries are not returned, but can be with the `recursive` column.
+## Table Usage Guide
+
+The `github_tree` table provides insights into the tree structures within GitHub Repositories. As a developer or project manager, explore each repository's file and directory hierarchy through this table, including file names, types, and associated metadata. Utilize it to uncover information about the organization and structure of repositories, such as the distribution of file types and the depth of directory nesting.
+
+**Important Notes**
+- You must specify the `repository_full_name` and `tree_sha` columns in `where` or `join` clause to query the table.
## Examples
### List tree entries non-recursively
+Explore the specific elements within the 'turbot/steampipe' repository by pinpointing specific locations using a unique identifier. This allows for a non-recursive view of the repository's structure, enabling easier navigation and understanding of the repository's layout and content.
+
+```sql+postgres
+select
+ tree_sha,
+ truncated,
+ path,
+ mode,
+ type,
+ sha
+from
+ github_tree
+where
+ repository_full_name = 'turbot/steampipe'
+ and tree_sha = '0f200416c44b8b85277d973bff933efa8ef7803a';
+```
-```sql
+```sql+sqlite
select
tree_sha,
truncated,
@@ -32,8 +50,9 @@ where
```
### List tree entries for a subtree recursively
+Determine the areas in which you can explore the components of a specific subtree within the 'turbot/steampipe' repository. This is useful for gaining insights into the structure and elements of the subtree in a recursive manner.
-```sql
+```sql+postgres
select
tree_sha,
truncated,
@@ -49,9 +68,26 @@ where
and recursive = true;
```
+```sql+sqlite
+select
+ tree_sha,
+ truncated,
+ path,
+ mode,
+ type,
+ sha
+from
+ github_tree
+where
+ repository_full_name = 'turbot/steampipe'
+ and tree_sha = '5622172b528cd38438c52ecfa3c20ac3f71dd2df'
+ and recursive = 1;
+```
+
### List executable files
+This query allows you to identify all the executable files within a specified repository. It's particularly useful for understanding the structure and content of a repository, and for identifying potential security risks associated with executable files.
-```sql
+```sql+postgres
select
tree_sha,
truncated,
@@ -68,9 +104,27 @@ where
and mode = '100755';
```
+```sql+sqlite
+select
+ tree_sha,
+ truncated,
+ path,
+ mode,
+ size,
+ sha
+from
+ github_tree
+where
+ repository_full_name = 'turbot/steampipe'
+ and tree_sha = '0f200416c44b8b85277d973bff933efa8ef7803a'
+ and recursive = 1
+ and mode = '100755';
+```
+
### List JSON files
+This query is useful for identifying all JSON files within a specific GitHub repository. It can help developers or project managers to quickly locate and manage all JSON files in the repository, aiding in tasks such as code review, debugging, or configuration management.
-```sql
+```sql+postgres
select
tree_sha,
truncated,
@@ -86,3 +140,20 @@ where
and recursive = true
and path like '%.json';
```
+
+```sql+sqlite
+select
+ tree_sha,
+ truncated,
+ path,
+ mode,
+ size,
+ sha
+from
+ github_tree
+where
+ repository_full_name = 'turbot/steampipe'
+ and tree_sha = '0f200416c44b8b85277d973bff933efa8ef7803a'
+ and recursive = 1
+ and path like '%.json';
+```
\ No newline at end of file
diff --git a/docs/tables/github_user.md b/docs/tables/github_user.md
index 2dce83cc..ee52b403 100644
--- a/docs/tables/github_user.md
+++ b/docs/tables/github_user.md
@@ -1,12 +1,25 @@
-# Table: github_user
+---
+title: "Steampipe Table: github_user - Query GitHub Users using SQL"
+description: "Allows users to query GitHub Users, specifically the user profiles, providing insights into user activities and contributions."
+---
-The `github_user` table does not list all users via the API - there is not currently an efficient way to limit the results in a useable way. As a result, you **must specify a user `login` in a `where`** or you will get no results.
+# Table: github_user - Query GitHub Users using SQL
+
+GitHub Users is a resource within GitHub that represents an individual user account on GitHub. It provides information about the user's public profile, such as the user's username, bio, location, email, and the date the user joined GitHub. GitHub Users also include statistics about the user's activities and contributions to GitHub repositories.
+
+## Table Usage Guide
+
+The `github_user` table provides insights into individual user accounts within GitHub. As a developer or project manager, explore user-specific details through this table, including user profiles, activities, and contributions. Utilize it to uncover information about users, such as their public profiles, the date they joined GitHub, and their contributions to repositories.
+
+**Important Notes**
+- You must specify the `login` column in `where` or `join` clause to query the table.
## Examples
### Get information for a user
+Explore the details associated with a specific GitHub user to gain insights into their activity and profile. This can be useful for understanding their contributions or for investigating user behavior.
-```sql
+```sql+postgres
select
*
from
@@ -15,41 +28,43 @@ where
login = 'torvalds';
```
-### List of users in your organizations
-
-```sql
+```sql+sqlite
select
- u.login,
- o.login as organization,
- u.name,
- u.company,
- u.location,
- u.twitter_username,
- u.bio
+ *
from
- github_user as u,
- github_my_organization as o,
- jsonb_array_elements_text(o.member_logins) as member_login
+ github_user
where
- u.login = member_login;
+ login = 'torvalds';
```
-### List of users that collaborate on a repository that you own
+### List users that are members of multiple organizations
-```sql
+```sql+postgres
select
- r.full_name as repository,
- u.login,
- u.name,
- u.company,
- u.location,
- u.twitter_username,
- u.bio
+ name,
+ email,
+ created_at,
+ bio,
+ twitter_username,
+ organizations_total_count
from
- github_user as u,
- github_my_repository as r,
- jsonb_array_elements_text(r.collaborator_logins) as collaborator_login
+ github_user
where
- u.login = collaborator_login
- and r.full_name = 'turbot/steampipe';
+ login = 'madhushreeray30'
+ and organizations_total_count > 1;
```
+
+```sql+sqlite
+select
+ name,
+ email,
+ created_at,
+ bio,
+ twitter_username,
+ organizations_total_count
+from
+ github_user
+where
+ login = 'madhushreeray30'
+ and organizations_total_count > 1;
+```
\ No newline at end of file
diff --git a/docs/tables/github_workflow.md b/docs/tables/github_workflow.md
index 5aa77271..817e371c 100644
--- a/docs/tables/github_workflow.md
+++ b/docs/tables/github_workflow.md
@@ -1,30 +1,48 @@
-# Table: github_workflow
+---
+title: "Steampipe Table: github_workflow - Query GitHub Workflows using SQL"
+description: "Allows users to query GitHub Workflows, specifically the details of workflows in GitHub repositories, enabling the tracking of workflow configurations, their state, and the associated branches."
+---
-A workflow is a configurable automated process made up of one or more jobs.
+# Table: github_workflow - Query GitHub Workflows using SQL
-The `github_workflow` table can be used to query information about any workflow, and **you must specify which repository** in the where or join clause using the `repository_full_name` column.
+GitHub Workflows is a feature within GitHub Actions that allows you to automate, customize, and execute your software development workflows right in your repository. It provides a flexible way to build an automated software development lifecycle workflow. With GitHub Workflows, you can build, test, and deploy your code right from GitHub.
+
+## Table Usage Guide
+
+The `github_workflow` table provides insights into Workflows within GitHub Actions. As a DevOps engineer, explore workflow-specific details through this table, including workflow configurations, status, and associated branches. Utilize it to monitor and manage workflows, such as those with specific event triggers, the branches associated with a workflow, and the verification of workflow configurations.
+
+**Important Notes**
+- You must specify the `repository_full_name` column in `where` or `join` clause to query the table.
## Examples
### List workflows
+Explore the characteristics and details of workflows within a specific GitHub repository. This can help in understanding the workflow structure and any specific patterns or anomalies, thereby aiding in effective repository management.
-```sql
+```sql+postgres
select
repository_full_name,
name,
path,
- text,
- line_count,
- size,
- language,
node_id,
- is_truncated,
- is_generated,
- is_binary,
- text_json,
- pipeline
+ state,
+ url
from
github_workflow
where
repository_full_name = 'turbot/steampipe';
```
+
+```sql+sqlite
+select
+ repository_full_name,
+ name,
+ path,
+ node_id,
+ state,
+ url
+from
+ github_workflow
+where
+ repository_full_name = 'turbot/steampipe';
+```
\ No newline at end of file