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

Update github_team & github_my_team tables to use GraphQL API #241

Closed
graza-io opened this issue May 3, 2023 · 2 comments
Closed

Update github_team & github_my_team tables to use GraphQL API #241

graza-io opened this issue May 3, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@graza-io
Copy link
Contributor

graza-io commented May 3, 2023

Is your feature request related to a problem? Please describe.
I'd like to use the GraphQL API when querying the table

Describe the solution you'd like
Update the table to use the GraphQL API

Describe alternatives you've considered
N/A

Additional context

For any fields that have paging, consider implementing that field as another table to avoid excess API calls (as per https://steampipe.io/docs/develop/plugin-release-checklist#data-ingestion).

New columns

  • created_at - was commented out previously as not supported, now it is.
  • updated_at - was commented out previously as not supported, now it is.
  • combined_slug - The slug corresponding to the organization and the team.
  • ancestors_total_count - count of ancestors.
  • child_teams_total_count - count of child teams.
  • discussions_count - count of discussions.
  • invitations_count - count of pending members invited but not yet processed.
  • projects_v2_count - count of v2 projects the team has.
  • avatar_url - url for teams avatar.
  • discussions_url - url for teams discussions.
  • edit_teams_url - url for editing the team.
  • teans_url - url to get teams that belong to this team.
  • can_administer - indicates if logged in user can administer the team.
  • can_subscribe - indicates if logged in user can subscribe to the team.
  • subscription - the subscription status of logged in user to the team.

Removed columns

  • organization_id
  • organization_login - would be a dupe of organization.
  • organization_type - not included on GraphQL API but also seems to be Organization.
  • permission - not included on GraphQL API.
  • html_url - Would be a duplicate of url

Renamed Columns

  • repos_count => repositories_count
  • parent => parent_team

Columns with data changes (please include examples of old and new data for each entry)

  • url - changed from REST API endpoint to web ui url (formerly html_url)
  • members_url - changed from REST API endpoint to web ui url
    • Old: https://api.github.com/organizations/38865304/team/1234567/members{/member}
    • New: https://github.com/orgs/turbot/teams/my-team/members
  • repositories_url - changed from REST API endpoint to web ui url
    • Old: https://api.github.com/organizations/38865304/team/1234567/repos
    • New: https://github.com/orgs/turbot/teams/my-team/repositories
  • parent_team (prev:parent) - addition of node_id to JSON
    • Old: {"id":1234, "slug":"my-team", "name":"My Team"}
    • New: {"name": "My Team", "slug": "my-team", "id": 1234, "node_id": "4togryvotu3qr"}
  • privacy - updated response values as per these docs (if required, this can be adjusted to previous values via a transform)
    • Old: closed or secret
    • New: VISIBLE or SECRET
@graza-io graza-io added the enhancement New feature or request label May 3, 2023
@graza-io graza-io self-assigned this May 3, 2023
@graza-io graza-io linked a pull request May 3, 2023 that will close this issue
@graza-io
Copy link
Contributor Author

Commit 3b97ed1 on graphql-dev branch

@graza-io graza-io changed the title Update github_team table to use GraphQL API Update github_team & github_my_team tables to use GraphQL API Jun 2, 2023
@cbruno10
Copy link
Contributor

cbruno10 commented Jun 16, 2023

Completed in 42680ef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants