Add table github_traffic_clone_daily and table github_traffic_clone_weekly - #505
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds two new Steampipe tables to surface GitHub repository clone metrics on a daily and weekly basis, registers them in the plugin, and provides markdown documentation for both.
- Introduce
github_traffic_clone_dailyandgithub_traffic_clone_weeklytable definitions with listing logic. - Register both tables in
plugin.go. - Add example usage and descriptions in corresponding docs under
docs/tables.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| github/table_github_traffic_clone_daily.go | Define github_traffic_clone_daily table and list hydrate for daily clones. |
| github/table_github_traffic_clone_weekly.go | Define github_traffic_clone_weekly table and list hydrate for weekly clones. |
| github/plugin.go | Register the new daily and weekly clone tables. |
| docs/tables/github_traffic_clone_daily.md | Add documentation for daily clone table (missing closing code fence). |
| docs/tables/github_traffic_clone_weekly.md | Add documentation for weekly clone table (missing closing code fence). |
Comments suppressed due to low confidence (5)
docs/tables/github_traffic_clone_daily.md:38
- Add a closing ``` after the SQL example to properly terminate the code block.
timestamp;
docs/tables/github_traffic_clone_weekly.md:38
- Add a closing ``` after the SQL example to properly terminate the code block.
timestamp;
github/table_github_traffic_clone_daily.go:13
- Add unit and integration tests covering the daily clone traffic table logic to ensure correct listing and transformation of clone stats.
func tableGitHubTrafficCloneDaily() *plugin.Table {
github/table_github_traffic_clone_weekly.go:13
- Add unit and integration tests covering the weekly clone traffic table logic to ensure correct listing and transformation of clone stats.
func tableGitHubTrafficCloneWeekly() *plugin.Table {
github/plugin.go:83
- [nitpick] Align indentation of the new table registrations to match the existing entries for consistent formatting.
"github_traffic_clone_daily": tableGitHubTrafficCloneDaily(),
ParthaI
left a comment
There was a problem hiding this comment.
Hi @sohanmaheshwar, I’ve added a few review comments—please take a look when you get a chance.
Additionally, it would be beneficial to include more example queries for the github_traffic_clone_daily and github_traffic_clone_weekly tables. Here are a few suggestions that could add value for users:
-
List daily clone statistics for all repositories
Show the number of clones and unique cloners per repository per day.
-
Find the repositories with the highest total clones in the past week
Summarize weekly clone counts to highlight your most visited repositories.
-
Show daily clone trends for a specific repository
Track the number of clones and unique users per day to analyze traffic over time.
-
Compare weekly clone counts across repositories
Identify which repositories are gaining or losing attention week-over-week.
-
Get the latest clone metrics for each repository
Quickly view the most recent daily or weekly clone statistics per repository.
Thanks!
Co-authored-by: Keep Focused <partha@turbot.com>
Co-authored-by: Keep Focused <partha@turbot.com>
|
Hi @sohanmaheshwar, all the changes in this PR look great — thanks for the updates! I noticed that one comment may have been missed: #505 (review). |
|
Hey @ParthaI Thanks for the review. I just pushed a PR which added a couple of the changes you requested:
Regarding the comment about example queries:
I've added the example query for Let me know if there's an alternate way to do this via SQL Join or a script that first queries |
Example query
SQL query results here
and
Example query
SQL query results here