Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: renamed 'user' columns to fix issue with it being a reserved word #289

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/tables/github_stargazer.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ order by
select
user_login,
starred_at,
"user" ->> 'name' as name,
"user" ->> 'company' as company,
"user" ->> 'email' as email,
"user" ->> 'url' as url,
"user" ->> 'twitter_username' as twitter_username,
"user" ->> 'website_url' as website,
"user" ->> 'location' as location,
"user" ->> 'bio' as bio
user_detail ->> 'name' as name,
user_detail ->> 'company' as company,
user_detail ->> 'email' as email,
user_detail ->> 'url' as url,
user_detail ->> 'twitter_username' as twitter_username,
user_detail ->> 'website_url' as website,
user_detail ->> 'location' as location,
user_detail ->> 'bio' as bio
from
github_stargazer
where
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_audit_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func tableGitHubAuditLog() *plugin.Table {

// Optional columns, depending on the audit event
{Name: "team", Type: proto.ColumnType_STRING, Description: "The GitHub team, when the action relates to a team."},
{Name: "user", Type: proto.ColumnType_STRING, Description: "The GitHub user, when the action relates to a user."},
{Name: "user_login", Type: proto.ColumnType_STRING, Description: "The GitHub user, when the action relates to a user.", Transform: transform.FromField("User")},
{Name: "repo", Type: proto.ColumnType_STRING, Description: "The GitHub repository, when the action relates to a repository."},
{Name: "data", Type: proto.ColumnType_JSON, Description: "Additional data relating to the audit event."},
},
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_stargazer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func tableGitHubStargazer() *plugin.Table {
{Name: "repository_full_name", Type: proto.ColumnType_STRING, Transform: transform.FromQual("repository_full_name"), Description: "Full name of the repository that contains the stargazer."},
{Name: "starred_at", Type: proto.ColumnType_TIMESTAMP, Transform: transform.FromField("StarredAt").Transform(convertTimestamp), Description: "Time when the stargazer was created."},
{Name: "user_login", Type: proto.ColumnType_STRING, Transform: transform.FromField("Node.Login"), Description: "The login name of the user who starred the repository."},
{Name: "user", Type: proto.ColumnType_JSON, Transform: transform.FromField("Node"), Description: "Details of the user who starred the repository."},
{Name: "user_detail", Type: proto.ColumnType_JSON, Transform: transform.FromField("Node"), Description: "Details of the user who starred the repository."},
},
}
}
Expand Down