Skip to content

Commit ef12d6e

Browse files
authored
Merge pull request #1 from stackql/feature/provider-dev
moved to microsite
2 parents a8f937b + 83902a0 commit ef12d6e

File tree

323 files changed

+26132
-185
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

323 files changed

+26132
-185
lines changed
File renamed without changes.
File renamed without changes.

README.md

Lines changed: 222 additions & 182 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 527 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"dependencies": {
1717
"@stackql/pgwire-lite": "^1.0.1",
18-
"@stackql/provider-utils": "^0.4.6"
18+
"@stackql/provider-utils": "^0.5.0"
1919
},
2020
"keywords": [
2121
"stackql",

website/docs/.gitkeep

Whitespace-only changes.

website/docs/index.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
title: github
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- github
7+
- stackql
8+
- infrastructure-as-code
9+
- configuration-as-data
10+
- cloud inventory
11+
description: Query, deploy and manage GitHub resources using SQL
12+
custom_edit_url: null
13+
image: /img/stackql-github-provider-featured-image.png
14+
id: 'provider-intro'
15+
---
16+
17+
import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
18+
19+
Web-based version-control and collaboration.
20+
21+
:::info Provider Summary (v24.04.00227)
22+
23+
<div class="row">
24+
<div class="providerDocColumn">
25+
<span>total services:&nbsp;<b>31</b></span><br />
26+
<span>total methods:&nbsp;<b>885</b></span><br />
27+
</div>
28+
<div class="providerDocColumn">
29+
<span>total resources:&nbsp;<b>281</b></span><br />
30+
<span>total selectable resources:&nbsp;<b>276</b></span><br />
31+
</div>
32+
</div>
33+
34+
:::
35+
36+
See also:
37+
[[` SHOW `]](https://stackql.io/docs/language-spec/show) [[` DESCRIBE `]](https://stackql.io/docs/language-spec/describe) [[` REGISTRY `]](https://stackql.io/docs/language-spec/registry)
38+
* * *
39+
40+
## Installation
41+
42+
To pull the latest version of the `github` provider, run the following command:
43+
44+
```bash
45+
REGISTRY PULL github;
46+
```
47+
> To view previous provider versions or to pull a specific provider version, see [here](https://stackql.io/docs/language-spec/registry).
48+
49+
## Authentication
50+
51+
The following system environment variables are used for authentication by default:
52+
53+
- <CopyableCode code="STACKQL_GITHUB_USERNAME" /> - GitHub username (login)
54+
- <CopyableCode code="STACKQL_GITHUB_PASSWORD" /> - GitHub Personal Access Token (see <a href="https://docs.github.com/en/enterprise-server@3.4/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token">Creating a personal access token</a>)
55+
56+
These variables are sourced at runtime (from the local machine or as CI variables/secrets).
57+
58+
<details>
59+
60+
<summary>Using different environment variables</summary>
61+
62+
To use different environment variables (instead of the defaults), use the `--auth` flag of the `stackql` program. For example:
63+
64+
```bash
65+
66+
AUTH='{ "github": { "type": "basic", "username_var": "YOUR_GITHUB_USERNAME_VAR", "password_var": "YOUR_GITHUB_PASSWORD_VAR" }}'
67+
stackql shell --auth="${AUTH}"
68+
69+
```
70+
or using PowerShell:
71+
72+
```powershell
73+
74+
$Auth = "{ 'github': { 'type': 'basic', 'username_var': 'YOUR_GITHUB_USERNAME_VAR', 'password_var': 'YOUR_GITHUB_PASSWORD_VAR' }}"
75+
stackql.exe shell --auth=$Auth
76+
77+
```
78+
</details>
79+
80+
## Services
81+
<div class="row">
82+
<div class="providerDocColumn">
83+
<a href="/services/actions/">actions</a><br />
84+
<a href="/services/activity/">activity</a><br />
85+
<a href="/services/apps/">apps</a><br />
86+
<a href="/services/billing/">billing</a><br />
87+
<a href="/services/checks/">checks</a><br />
88+
<a href="/services/code_scanning/">code_scanning</a><br />
89+
<a href="/services/codes_of_conduct/">codes_of_conduct</a><br />
90+
<a href="/services/codespaces/">codespaces</a><br />
91+
<a href="/services/copilot/">copilot</a><br />
92+
<a href="/services/dependabot/">dependabot</a><br />
93+
<a href="/services/dependency_graph/">dependency_graph</a><br />
94+
<a href="/services/gists/">gists</a><br />
95+
<a href="/services/git/">git</a><br />
96+
<a href="/services/gitignore/">gitignore</a><br />
97+
<a href="/services/interactions/">interactions</a><br />
98+
<a href="/services/issues/">issues</a><br />
99+
</div>
100+
<div class="providerDocColumn">
101+
<a href="/services/licenses/">licenses</a><br />
102+
<a href="/services/migrations/">migrations</a><br />
103+
<a href="/services/oidc/">oidc</a><br />
104+
<a href="/services/orgs/">orgs</a><br />
105+
<a href="/services/packages/">packages</a><br />
106+
<a href="/services/projects/">projects</a><br />
107+
<a href="/services/pulls/">pulls</a><br />
108+
<a href="/services/rate_limit/">rate_limit</a><br />
109+
<a href="/services/reactions/">reactions</a><br />
110+
<a href="/services/repos/">repos</a><br />
111+
<a href="/services/search/">search</a><br />
112+
<a href="/services/secret_scanning/">secret_scanning</a><br />
113+
<a href="/services/security_advisories/">security_advisories</a><br />
114+
<a href="/services/teams/">teams</a><br />
115+
<a href="/services/users/">users</a><br />
116+
</div>
117+
</div>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: allowed_actions
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- allowed_actions
7+
- actions
8+
- github
9+
- stackql
10+
- infrastructure-as-code
11+
- configuration-as-data
12+
- cloud inventory
13+
description: Query, deploy and manage GitHub resources using SQL
14+
custom_edit_url: null
15+
image: /img/stackql-github-provider-featured-image.png
16+
---
17+
18+
import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
19+
20+
21+
22+
23+
## Overview
24+
<table><tbody>
25+
<tr><td><b>Name</b></td><td><code>allowed_actions</code></td></tr>
26+
<tr><td><b>Type</b></td><td>Resource</td></tr>
27+
<tr><td><b>Id</b></td><td><CopyableCode code="github.actions.allowed_actions" /></td></tr>
28+
</tbody></table>
29+
30+
## Fields
31+
| Name | Datatype | Description |
32+
|:-----|:---------|:------------|
33+
| <CopyableCode code="github_owned_allowed" /> | `boolean` | Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. |
34+
| <CopyableCode code="patterns_allowed" /> | `array` | Specifies a list of string-matching patterns to allow specific action(s) and reusable workflow(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`.<br /><br />**Note**: The `patterns_allowed` setting only applies to public repositories. |
35+
| <CopyableCode code="verified_allowed" /> | `boolean` | Whether actions from GitHub Marketplace verified creators are allowed. Set to `true` to allow all actions by GitHub Marketplace verified creators. |
36+
## Methods
37+
| Name | Accessible by | Required Params | Description |
38+
|:-----|:--------------|:----------------|:------------|
39+
| <CopyableCode code="get_allowed_actions_organization" /> | `SELECT` | <CopyableCode code="org" /> | Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization).""<br /><br />You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. |
40+
| <CopyableCode code="get_allowed_actions_repository" /> | `SELECT` | <CopyableCode code="owner, repo" /> | Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."<br /><br />You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. |
41+
| <CopyableCode code="set_allowed_actions_organization" /> | `EXEC` | <CopyableCode code="org" /> | Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."<br /><br />You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. |
42+
| <CopyableCode code="set_allowed_actions_repository" /> | `EXEC` | <CopyableCode code="owner, repo" /> | Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)."<br /><br />You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration` repository permission to use this API. |
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: artifacts
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- artifacts
7+
- actions
8+
- github
9+
- stackql
10+
- infrastructure-as-code
11+
- configuration-as-data
12+
- cloud inventory
13+
description: Query, deploy and manage GitHub resources using SQL
14+
custom_edit_url: null
15+
image: /img/stackql-github-provider-featured-image.png
16+
---
17+
18+
import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
19+
20+
21+
22+
23+
## Overview
24+
<table><tbody>
25+
<tr><td><b>Name</b></td><td><code>artifacts</code></td></tr>
26+
<tr><td><b>Type</b></td><td>Resource</td></tr>
27+
<tr><td><b>Id</b></td><td><CopyableCode code="github.actions.artifacts" /></td></tr>
28+
</tbody></table>
29+
30+
## Fields
31+
| Name | Datatype | Description |
32+
|:-----|:---------|:------------|
33+
| <CopyableCode code="id" /> | `integer` | |
34+
| <CopyableCode code="name" /> | `string` | The name of the artifact. |
35+
| <CopyableCode code="archive_download_url" /> | `string` | |
36+
| <CopyableCode code="created_at" /> | `string` | |
37+
| <CopyableCode code="expired" /> | `boolean` | Whether or not the artifact has expired. |
38+
| <CopyableCode code="expires_at" /> | `string` | |
39+
| <CopyableCode code="node_id" /> | `string` | |
40+
| <CopyableCode code="size_in_bytes" /> | `integer` | The size in bytes of the artifact. |
41+
| <CopyableCode code="updated_at" /> | `string` | |
42+
| <CopyableCode code="url" /> | `string` | |
43+
| <CopyableCode code="workflow_run" /> | `object` | |
44+
## Methods
45+
| Name | Accessible by | Required Params | Description |
46+
|:-----|:--------------|:----------------|:------------|
47+
| <CopyableCode code="get_artifact" /> | `SELECT` | <CopyableCode code="artifact_id, owner, repo" /> | Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. |
48+
| <CopyableCode code="list_artifacts_for_repo" /> | `SELECT` | <CopyableCode code="owner, repo" /> | Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. |
49+
| <CopyableCode code="list_workflow_run_artifacts" /> | `SELECT` | <CopyableCode code="owner, repo, run_id" /> | Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. |
50+
| <CopyableCode code="delete_artifact" /> | `DELETE` | <CopyableCode code="artifact_id, owner, repo" /> | Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. |
51+
| <CopyableCode code="download_artifact" /> | `EXEC` | <CopyableCode code="archive_format, artifact_id, owner, repo" /> | Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in<br />the response header to find the URL for the download. The `:archive_format` must be `zip`.<br /><br />You must authenticate using an access token with the `repo` scope to use this endpoint.<br />GitHub Apps must have the `actions:read` permission to use this endpoint. |
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: cache
3+
hide_title: false
4+
hide_table_of_contents: false
5+
keywords:
6+
- cache
7+
- actions
8+
- github
9+
- stackql
10+
- infrastructure-as-code
11+
- configuration-as-data
12+
- cloud inventory
13+
description: Query, deploy and manage GitHub resources using SQL
14+
custom_edit_url: null
15+
image: /img/stackql-github-provider-featured-image.png
16+
---
17+
18+
import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
19+
20+
21+
22+
23+
## Overview
24+
<table><tbody>
25+
<tr><td><b>Name</b></td><td><code>cache</code></td></tr>
26+
<tr><td><b>Type</b></td><td>Resource</td></tr>
27+
<tr><td><b>Id</b></td><td><CopyableCode code="github.actions.cache" /></td></tr>
28+
</tbody></table>
29+
30+
## Fields
31+
| Name | Datatype | Description |
32+
|:-----|:---------|:------------|
33+
| <CopyableCode code="actions_caches" /> | `array` | Array of caches |
34+
| <CopyableCode code="total_count" /> | `integer` | Total number of caches |
35+
## Methods
36+
| Name | Accessible by | Required Params | Description |
37+
|:-----|:--------------|:----------------|:------------|
38+
| <CopyableCode code="get_actions_cache_list" /> | `SELECT` | <CopyableCode code="owner, repo" /> | Lists the GitHub Actions caches for a repository.<br />You must authenticate using an access token with the `repo` scope to use this endpoint.<br />GitHub Apps must have the `actions:read` permission to use this endpoint. |
39+
| <CopyableCode code="delete_actions_cache_by_id" /> | `DELETE` | <CopyableCode code="cache_id, owner, repo" /> | Deletes a GitHub Actions cache for a repository, using a cache ID.<br /><br />You must authenticate using an access token with the `repo` scope to use this endpoint.<br /><br />GitHub Apps must have the `actions:write` permission to use this endpoint. |
40+
| <CopyableCode code="delete_actions_cache_by_key" /> | `DELETE` | <CopyableCode code="key, owner, repo" /> | Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref.<br /><br />You must authenticate using an access token with the `repo` scope to use this endpoint.<br /><br />GitHub Apps must have the `actions:write` permission to use this endpoint. |

0 commit comments

Comments
 (0)