Skip to content

Commit

Permalink
Merge pull request #225 from stackql/feature/provider
Browse files Browse the repository at this point in the history
updated `github`
  • Loading branch information
jeffreyaven authored Apr 24, 2024
2 parents 838c61f + b108b78 commit e984136
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions providers/src/github/v00.00.00000/services/activity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29329,6 +29329,80 @@ components:
insert: []
update: []
delete: []
repo_stargazers_extended:
id: github.activity.repo_stargazers_extended
name: repo_stargazers_extended
title: Repo Stargazers extened response
methods:
list_stargazers_for_repo:
operation:
$ref: '#/paths/~1repos~1{owner}~1{repo}~1stargazers/get'
response:
mediaType: application/vnd.github.star+json
openAPIDocKey: '200'
sqlVerbs:
select:
- $ref: '#/components/x-stackQL-resources/repo_stargazers_extended/methods/list_stargazers_for_repo'
insert: []
update: []
delete: []
repo_stargazers_with_timestamps:
name: repo_stargazers_with_timestamps
id: github.activity.repo_stargazers_with_timestamps
config:
views:
select:
predicate: sqlDialect == "sqlite3"
ddl: |-
SELECT
JSON_EXTRACT(user, '$.login') as login,
JSON_EXTRACT(user, '$.id') as id,
JSON_EXTRACT(user, '$.node_id') as node_id,
JSON_EXTRACT(user, '$.type') as type,
JSON_EXTRACT(user, '$.url') as url,
JSON_EXTRACT(user, '$.avatar_url') as avatar_url,
JSON_EXTRACT(user, '$.events_url') as events_url,
JSON_EXTRACT(user, '$.followers_url') as followers_url,
JSON_EXTRACT(user, '$.following_url') as following_url,
JSON_EXTRACT(user, '$.gists_url') as gists_url,
JSON_EXTRACT(user, '$.gravatar_id') as gravatar_id,
JSON_EXTRACT(user, '$.html_url') as html_url,
JSON_EXTRACT(user, '$.organizations_url') as organizations_url,
JSON_EXTRACT(user, '$.received_events_url') as received_events_url,
JSON_EXTRACT(user, '$.repos_url') as repos_url,
JSON_EXTRACT(user, '$.site_admin') as site_admin,
JSON_EXTRACT(user, '$.starred_url') as starred_url,
JSON_EXTRACT(user, '$.subscriptions_url') as subscriptions_url,
starred_at
FROM
github.activity.repo_stargazers_extended
WHERE owner = 'stackql' and repo = 'stackql'
fallback:
predicate: sqlDialect == "postgres"
ddl: |-
SELECT
json_extract_path_text(user, 'login') as login,
json_extract_path_text(user, 'id') as id,
json_extract_path_text(user, 'node_id') as node_id,
json_extract_path_text(user, 'type') as type,
json_extract_path_text(user, 'url') as url,
json_extract_path_text(user, 'avatar_url') as avatar_url,
json_extract_path_text(user, 'events_url') as events_url,
json_extract_path_text(user, 'followers_url') as followers_url,
json_extract_path_text(user, 'following_url') as following_url,
json_extract_path_text(user, 'gists_url') as gists_url,
json_extract_path_text(user, 'gravatar_id') as gravatar_id,
json_extract_path_text(user, 'html_url') as html_url,
json_extract_path_text(user, 'organizations_url') as organizations_url,
json_extract_path_text(user, 'received_events_url') as received_events_url,
json_extract_path_text(user, 'repos_url') as repos_url,
json_extract_path_text(user, 'site_admin') as site_admin,
json_extract_path_text(user, 'starred_url') as starred_url,
json_extract_path_text(user, 'subscriptions_url') as subscriptions_url,
starred_at
FROM
github.activity.repo_stargazers_extended
WHERE owner = 'stackql' and repo = 'stackql'
repo_watchers:
id: github.activity.repo_watchers
name: repo_watchers
Expand Down Expand Up @@ -30063,6 +30137,11 @@ paths:
$ref: '#/components/examples/simple-user-items-default-response'
alternative-response-with-star-creation-timestamps:
$ref: '#/components/examples/stargazer-items-alternative-response-with-star-creation-timestamps'
application/vnd.github.star+json:
schema:
type: array
items:
$ref: '#/components/schemas/stargazer'
headers:
Link:
$ref: '#/components/headers/link'
Expand Down

0 comments on commit e984136

Please sign in to comment.