From 72edf27393c2aaa291cd9fbddd7cfd3d242eed8d Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Wed, 24 Apr 2024 10:36:12 +1000 Subject: [PATCH 1/2] updated github --- .../v00.00.00000/services/activity.yaml | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/providers/src/github/v00.00.00000/services/activity.yaml b/providers/src/github/v00.00.00000/services/activity.yaml index f65a26cf..9845746d 100644 --- a/providers/src/github/v00.00.00000/services/activity.yaml +++ b/providers/src/github/v00.00.00000/services/activity.yaml @@ -29329,6 +29329,78 @@ 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 + 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 repo_watchers: id: github.activity.repo_watchers name: repo_watchers @@ -30063,6 +30135,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' From b108b7845c289ec96d588f069266e1afd655ed1b Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Wed, 24 Apr 2024 10:43:39 +1000 Subject: [PATCH 2/2] updated github --- providers/src/github/v00.00.00000/services/activity.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/providers/src/github/v00.00.00000/services/activity.yaml b/providers/src/github/v00.00.00000/services/activity.yaml index 9845746d..5aa17d97 100644 --- a/providers/src/github/v00.00.00000/services/activity.yaml +++ b/providers/src/github/v00.00.00000/services/activity.yaml @@ -29376,6 +29376,7 @@ components: starred_at FROM github.activity.repo_stargazers_extended + WHERE owner = 'stackql' and repo = 'stackql' fallback: predicate: sqlDialect == "postgres" ddl: |- @@ -29401,6 +29402,7 @@ components: starred_at FROM github.activity.repo_stargazers_extended + WHERE owner = 'stackql' and repo = 'stackql' repo_watchers: id: github.activity.repo_watchers name: repo_watchers