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_pull_request table to use GraphQL API #276

Closed
graza-io opened this issue Jun 1, 2023 · 2 comments · Fixed by #280
Closed

Update github_pull_request table to use GraphQL API #276

graza-io opened this issue Jun 1, 2023 · 2 comments · Fixed by #280
Assignees
Labels
enhancement New feature or request

Comments

@graza-io
Copy link
Contributor

graza-io commented Jun 1, 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

  • active_lock_reason
  • author
  • checks_url
  • closed
  • created_via_email
  • editor
  • head_ref_oid
  • includes_created_edit
  • is_cross_repository
  • is_read_by_user
  • last_edited_at
  • merged_by
  • milestone
  • permalink
  • published_at
  • revert_url
  • review_decision
  • base_ref
  • head_ref
  • merge_commit
  • suggested_reviewers
  • can_apply_suggestion
  • can_close
  • can_delete_head_ref
  • can_disable_auto_merge
  • can_edit_files
  • can_enable_auto_merge
  • can_merge_as_admin
  • can_react
  • can_reopen
  • can_subscribe
  • can_update
  • can_update_branch
  • did_author
  • cannot_update_reasons
  • subscription
  • assignees_total_count
  • labels_total_count
  • commits_total_count
  • review_requests_total_count
  • reviews_total_count

Renamed columns

  • issue_number => number
  • comments => total_comments_count
  • draft => is_draft
  • base_ref => base_ref_name
  • head_ref => head_ref_name
  • html_url => url
  • rebaseable => can_be_rebased

Removed columns

  • rebaseable - SEE NOTE IN COMMENT BELOW
  • author_login - obtain from author column json
  • assignee_logins - has a count now, is pageable - build a new table?
  • comments_url - rest api endpoint.
  • commits_url - rest api endpoint.
  • diff_url - not returned in GraphQL api.
  • issue_url - not returned in GraphQL api.
  • labels - has a count now, is pageable - build a new table?
  • mergeable_state - now merged into mergeable
  • merged_by_login - obtain from merged_by column json
  • merge_commit_sha - obtain from merged_commit column json
  • milestone_id - obtain from milestone column json
  • milestone_title - obtain from milestone column json
  • patch_url - not returned in GraphQL api
  • requested_reviewer_logins - has a count now, is pageable - build a new table?
  • review_comments
  • review_comments_url
  • review_comment_url
  • statuses_url
  • tags

Columns with data changes

  • mergeable - was formally a bool, now is a string (CONFLICTING, MERGEABLE, UNKNOWN)
@graza-io graza-io added the enhancement New feature or request label Jun 1, 2023
@graza-io graza-io self-assigned this Jun 1, 2023
@graza-io
Copy link
Contributor Author

graza-io commented Jun 1, 2023

Note: canBeRebased needs a custom header object setting on the underlying httpClient as per : https://docs.github.com/en/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview

Removed for now, will look to re-add this later...

@graza-io
Copy link
Contributor Author

graza-io commented Jun 1, 2023

dbaa367 on graphql-dev branch

@graza-io graza-io linked a pull request Jun 2, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant