Skip to content

Commit

Permalink
Rename columns user -> user_login in github_audit_log table and…
Browse files Browse the repository at this point in the history
… `user` -> `user_detail` in `github_stargazer` table fixes #288 (#289)
  • Loading branch information
graza-io authored Jul 7, 2023
1 parent d7eb958 commit fc778fc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
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

0 comments on commit fc778fc

Please sign in to comment.