Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 0 additions & 42 deletions .github/workflows/star-check.yml

This file was deleted.

4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ output/
.stackql/
stackql
stackql-zip
stackql-aws-cloud-shell.sh
stackql-azure-cloud-shell.sh
stackql-google-cloud-shell.sh
stackql-*.sh
.env
nohup.out

Expand Down
137 changes: 29 additions & 108 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,18 @@ Next, split the monolithic OpenAPI specification into service-specific files:
rm -rf provider-dev/source/*
npm run split -- \
--provider-name github \
--api-doc provider-dev/downloaded/github-openapi.json \
--api-doc provider-dev/downloaded/api.github.com.json \
--svc-discriminator tag \
--output-dir provider-dev/source \
--overwrite \
--svc-name-overrides "$(cat <<EOF
{
"repos": "repos",
"users": "users",
"orgs": "organizations",
"pulls": "pull_requests",
"issues": "issues",
"actions": "actions",
"apps": "apps",
"code-scanning": "code_scanning",
"packages": "packages",
"teams": "teams",
"projects": "projects",
"git": "git",
"gists": "gists",
"checks": "checks",
"codespaces": "codespaces",
"search": "search",
"rate-limit": "rate_limit",
"licenses": "licenses",
"meta": "meta",
"billing": "billing"
}
EOF
)"
--overwrite
```

## 2a. Clobber Polymorhism and Fix Schema Issues

```bash
npm run normalize -- \
--api-dir provider-dev/source \
--verbose
```

## 3. Generate Mappings
Expand All @@ -65,7 +48,6 @@ Generate the mapping configuration that connects OpenAPI operations to StackQL r

```bash
npm run generate-mappings -- \
--provider-name github \
--input-dir provider-dev/source \
--output-dir provider-dev/config
```
Expand All @@ -83,8 +65,8 @@ npm run generate-provider -- \
--input-dir provider-dev/source \
--output-dir provider-dev/openapi/src/github \
--config-path provider-dev/config/all_services.csv \
--servers '[{"url": "https://api.github.com"}]' \
--provider-config '{"auth": {"credentialsenvvar": "GITHUB_TOKEN", "type": "bearer"}}' \
--servers='[{"url":"https://api.github.com"}]' \
--provider-config='{"auth":{"type":"basic","username_var":"STACKQL_GITHUB_USERNAME","password_var":"STACKQL_GITHUB_PASSWORD"}}' \
--overwrite
```

Expand Down Expand Up @@ -134,57 +116,23 @@ Example queries to try:
```sql
-- List your repositories
SELECT
id,
name,
full_name,
private,
html_url,
description,
fork,
created_at,
updated_at,
pushed_at,
language,
default_branch,
visibility
FROM github.repos.repos;

-- Get information about a specific repository
SELECT
id,
name,
full_name,
owner,
private,
html_url,
description,
fork,
created_at,
updated_at,
pushed_at,
size,
stargazers_count,
watchers_count,
language,
forks_count,
open_issues_count,
license,
topics
FROM github.repos.repo
WHERE owner = 'stackql'
AND repo = 'stackql';
visibility,
stargazers_count as stars
FROM github.repos.repos
WHERE org = 'stackql'
ORDER BY watchers DESC;

-- List repository issues
SELECT
number,
title,
state,
created_at,
updated_at,
user,
labels,
assignees,
comments
created_at
FROM github.issues.issues
WHERE owner = 'stackql'
AND repo = 'stackql';
Expand All @@ -194,17 +142,11 @@ SELECT
number,
title,
state,
created_at,
updated_at,
closed_at,
merged_at,
user,
draft,
labels,
requested_reviewers
FROM github.pull_requests.pulls
created_at
FROM github.pulls.pull_requests
WHERE owner = 'stackql'
AND repo = 'stackql';
AND repo = 'stackql'
AND state = 'closed' LIMIT 5;

-- Get organization information
SELECT
Expand All @@ -213,51 +155,30 @@ id,
name,
description,
email,
blog,
location,
created_at,
updated_at,
plan,
members_can_create_repositories
FROM github.organizations.org
WHERE org = 'stackql';

-- List organization repositories
SELECT
id,
name,
full_name,
private,
html_url,
description,
fork,
created_at,
updated_at,
language,
visibility
FROM github.repos.org_repos
plan
FROM github.orgs.orgs
WHERE org = 'stackql';

-- List GitHub Actions workflow runs
SELECT
id,
name,
workflow_id,
head_branch,
head_sha,
run_number,
event,
status,
conclusion,
created_at,
updated_at
created_at
FROM github.actions.workflow_runs
WHERE owner = 'stackql'
AND repo = 'stackql';

-- Check your rate limit status
SELECT
*
JSON_EXTRACT(rate, '$.limit') AS rate_limit,
JSON_EXTRACT(rate, '$.remaining') AS remaining,
datetime(JSON_EXTRACT(rate, '$.reset'), 'unixepoch') AS reset_date,
JSON_EXTRACT(rate, '$.used') AS used
FROM github.rate_limit.rate_limit;
```

Expand Down
44 changes: 0 additions & 44 deletions bin/generate-docs.mjs

This file was deleted.

63 changes: 0 additions & 63 deletions bin/generate-docs.sh

This file was deleted.

Loading
Loading