refactor: improve scopes.json structure and update scripts for better usability

This commit is contained in:
Prad Nukala 2024-12-07 17:32:11 -05:00
parent 4af64c8524
commit c36dc537ef
3 changed files with 283 additions and 71 deletions

344
.github/scopes.json vendored
View File

@ -1,82 +1,188 @@
[ [
{ {
"name": "cosmos/sdk", "name": "app/cosmos-sdk",
"path": "app", "path": "app",
"docs": [ "docs": [
"https://docs.cosmos.network/v0.50/build/building-modules/module-manager", {
"https://docs.cosmos.network/v0.50/build/building-modules/messages-and-queries", "keywords": [],
"https://docs.cosmos.network/v0.50/build/building-modules/msg-services", "url": "https://docs.cosmos.network/v0.50/build/building-modules/module-manager"
"https://docs.cosmos.network/v0.50/build/building-modules/query-services", },
"https://docs.cosmos.network/v0.50/build/building-modules/depinject" {
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/building-modules/messages-and-queries"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/building-modules/msg-services"
},
{
"keywords": [
"query"
],
"url": "https://docs.cosmos.network/v0.50/build/building-modules/query-services"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/building-modules/depinject"
}
] ]
}, },
{ {
"name": "cosmos/ibc", "name": "app/ibc",
"path": "app", "path": "app",
"docs": [ "docs": [
"https://ibc.cosmos.network/v8/apps/interchain-accounts/overview/", {
"https://ibc.cosmos.network/v8/apps/transfer/overview/", "keywords": [],
"https://docs.osmosis.zone/osmosis-core/asset-info/", "url": "https://ibc.cosmos.network/v8/apps/interchain-accounts/overview/"
"https://docs.osmosis.zone/osmosis-core/modules/tokenfactory", },
"https://docs.noble.xyz/cctp/mint", {
"https://docs.noble.xyz/cctp/mint_forward", "keywords": [],
"https://docs.evmos.org/protocol/modules/erc20", "url": "https://ibc.cosmos.network/v8/apps/transfer/overview/"
"https://docs.nomic.io/nbtc" },
{
"keywords": [],
"url": "https://docs.osmosis.zone/osmosis-core/asset-info/"
},
{
"keywords": [],
"url": "https://docs.osmosis.zone/osmosis-core/modules/tokenfactory"
},
{
"keywords": [
"usdc"
],
"url": "https://docs.noble.xyz/cctp/mint"
},
{
"keywords": [
"usdc"
],
"url": "https://docs.noble.xyz/cctp/mint_forward"
},
{
"keywords": [],
"url": "https://docs.evmos.org/protocol/modules/erc20"
},
{
"keywords": [],
"url": "https://docs.nomic.io/nbtc"
}
] ]
}, },
{ {
"name": "crypto/mpc", "name": "crypto/mpc",
"path": "crypto/mpc", "path": "crypto/mpc",
"docs": [ "docs": [
"https://csrc.nist.gov/CSRC/media/Events/NTCW19/papers/paper-DKLS.pdf" {
"keywords": [],
"url": "https://csrc.nist.gov/CSRC/media/Events/NTCW19/papers/paper-DKLS.pdf"
}
] ]
}, },
{ {
"name": "crypto/ucan", "name": "crypto/ucan",
"path": "crypto/ucan", "path": "crypto/ucan",
"docs": [ "docs": [
"https://raw.githubusercontent.com/ucan-wg/spec/refs/heads/main/README.md" {
"keywords": [],
"url": "https://raw.githubusercontent.com/ucan-wg/spec/refs/heads/main/README.md"
}
] ]
}, },
{ {
"name": "crypto/zkp", "name": "crypto/zkp",
"path": "crypto/accumulator", "path": "crypto/accumulator",
"docs": [ "docs": [
"https://eprint.iacr.org/2021/1672.pdf" {
"keywords": [],
"url": "https://eprint.iacr.org/2021/1672.pdf"
}
] ]
}, },
{ {
"name": "gateway/handlers", "name": "gateway/handlers",
"path": "pkg/gateway/handlers", "path": "pkg/gateway/handlers",
"docs": [ "docs": [
"https://echo.labstack.com/docs/cookbook/sse", {
"https://echo.labstack.com/docs/cookbook/websocket", "keywords": [],
"https://echo.labstack.com/docs/cookbook/subdomain" "url": "https://echo.labstack.com/docs/cookbook/sse"
},
{
"keywords": [],
"url": "https://echo.labstack.com/docs/cookbook/websocket"
},
{
"keywords": [],
"url": "https://echo.labstack.com/docs/cookbook/subdomain"
}
] ]
}, },
{ {
"name": "gateway/database", "name": "gateway/database",
"path": "pkg/gateway/internal/database", "path": "pkg/gateway/internal/database",
"docs": [ "docs": [
"https://docs.tigerbeetle.com/coding/data-modeling", {
"https://docs.tigerbeetle.com/coding/two-phase-transfers", "keywords": [],
"https://docs.tigerbeetle.com/coding/reliable-transaction-submission", "url": "https://docs.tigerbeetle.com/coding/data-modeling"
"https://docs.tigerbeetle.com/coding/recipes/currency-exchange", },
"https://docs.tigerbeetle.com/coding/recipes/balance-conditional-transfers", {
"https://docs.tigerbeetle.com/reference/account", "keywords": [],
"https://docs.tigerbeetle.com/reference/transfer", "url": "https://docs.tigerbeetle.com/coding/two-phase-transfers"
"https://docs.substreams.dev/documentation/consume/packages", },
"https://docs.substreams.dev/documentation/consume/sql/deployable-services/local-service", {
"https://docs.substreams.dev/tutorials/cosmos/injective/foundational" "keywords": [],
"url": "https://docs.tigerbeetle.com/coding/reliable-transaction-submission"
},
{
"keywords": [
"currency"
],
"url": "https://docs.tigerbeetle.com/coding/recipes/currency-exchange"
},
{
"keywords": [
"balance"
],
"url": "https://docs.tigerbeetle.com/coding/recipes/balance-conditional-transfers"
},
{
"keywords": [],
"url": "https://docs.tigerbeetle.com/reference/account"
},
{
"keywords": [],
"url": "https://docs.tigerbeetle.com/reference/transfer"
},
{
"keywords": [],
"url": "https://docs.substreams.dev/documentation/consume/packages"
},
{
"keywords": [],
"url": "https://docs.substreams.dev/documentation/consume/sql/deployable-services/local-service"
},
{
"keywords": [],
"url": "https://docs.substreams.dev/tutorials/cosmos/injective/foundational"
}
] ]
}, },
{ {
"name": "vault/handlers", "name": "vault/handlers",
"path": "pkg/vault/handlers", "path": "pkg/vault/handlers",
"docs": [ "docs": [
"https://echo.labstack.com/docs/cookbook/jwt", {
"https://echo.labstack.com/docs/middleware/secure", "keywords": [],
"https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API" "url": "https://echo.labstack.com/docs/cookbook/jwt"
},
{
"keywords": [],
"url": "https://echo.labstack.com/docs/middleware/secure"
},
{
"keywords": [],
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
}
] ]
}, },
{ {
@ -92,16 +198,28 @@
"name": "pkl/ipfs", "name": "pkl/ipfs",
"path": "pkl/ipfs.net", "path": "pkl/ipfs.net",
"docs": [ "docs": [
"https://github.com/ipfs/kubo/blob/master/docs/config.md", {
"https://pkl-lang.org/main/current/language-reference/index.html" "keywords": [],
"url": "https://github.com/ipfs/kubo/blob/master/docs/config.md"
},
{
"keywords": [],
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
}
] ]
}, },
{ {
"name": "pkl/matrix", "name": "pkl/matrix",
"path": "pkl/matrix.net", "path": "pkl/matrix.net",
"docs": [ "docs": [
"https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html", {
"https://pkl-lang.org/main/current/language-reference/index.html" "keywords": [],
"url": "https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html"
},
{
"keywords": [],
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
}
] ]
}, },
{ {
@ -118,72 +236,162 @@
"name": "pkl/hway", "name": "pkl/hway",
"path": "pkl/sonr.hway", "path": "pkl/sonr.hway",
"docs": [ "docs": [
"https://pkl-lang.org/main/current/language-reference/index.html" {
"keywords": [],
"url": "https://pkl-lang.org/main/current/language-reference/index.html"
}
] ]
}, },
{ {
"name": "pkl/motr", "name": "pkl/motr",
"path": "pkl/sonr.motr", "path": "pkl/sonr.motr",
"docs": [ "docs": [
"https://pkl-lang.org/main/current/language-reference/index.html", {
"https://web.dev/learn/pwa/service-workers/", "keywords": [],
"https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API" "url": "https://pkl-lang.org/main/current/language-reference/index.html"
},
{
"keywords": [],
"url": "https://web.dev/learn/pwa/service-workers/"
},
{
"keywords": [],
"url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API"
}
] ]
}, },
{ {
"name": "x/did", "name": "x/did",
"path": "proto/did", "path": "proto/did",
"docs": [ "docs": [
"https://docs.cosmos.network/v0.50/build/packages/orm", {
"https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations", "keywords": [],
"https://docs.cosmos.network/v0.50/build/modules/auth", "url": "https://docs.cosmos.network/v0.50/build/packages/orm"
"https://docs.cosmos.network/v0.50/build/packages/collections", },
"https://docs.cosmos.network/v0.50/build/modules/bank" {
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/modules/auth"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/packages/collections"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/modules/bank"
}
] ]
}, },
{ {
"name": "x/dwn", "name": "x/dwn",
"path": "proto/dwn", "path": "proto/dwn",
"docs": [ "docs": [
"https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations", {
"https://docs.cosmos.network/v0.50/build/packages/orm", "keywords": [],
"https://docs.cosmos.network/v0.50/build/modules/authz", "url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
"https://docs.cosmos.network/v0.50/build/packages/collections", },
"https://docs.cosmos.network/v0.50/build/modules/gov", {
"https://docs.cosmos.network/v0.50/build/modules/staking" "keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/packages/orm"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/modules/authz"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/packages/collections"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/modules/gov"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/modules/staking"
}
] ]
}, },
{ {
"name": "x/svc", "name": "x/svc",
"path": "proto/svc", "path": "proto/svc",
"docs": [ "docs": [
"https://docs.cosmos.network/v0.50/build/packages/collections", {
"https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations", "keywords": [],
"https://docs.cosmos.network/v0.50/build/packages/orm", "url": "https://docs.cosmos.network/v0.50/build/packages/collections"
"https://docs.cosmos.network/v0.50/build/modules/group", },
"https://docs.cosmos.network/v0.50/build/modules/nft" {
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/packages/orm"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/modules/group"
},
{
"keywords": [],
"url": "https://docs.cosmos.network/v0.50/build/modules/nft"
}
] ]
}, },
{ {
"name": "repo/ci-cd", "name": "repo/ci-cd",
"path": "deploy", "path": "deploy",
"docs": [ "docs": [
"https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions", {
"https://docs.cosmos.network/v0.50/build/tooling/cosmovisor", "keywords": [],
"https://f1bonacc1.github.io/process-compose/configuration/", "url": "https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions"
"https://docs.nomic.io/network/ibc-relayer", },
"https://www.jetify.com/docs/devbox", {
"https://taskfile.dev/reference/cli", "keywords": [],
"https://taskfile.dev/reference/schema", "url": "https://docs.cosmos.network/v0.50/build/tooling/cosmovisor"
"https://taskfile.dev/reference/templating/" },
{
"keywords": [],
"url": "https://f1bonacc1.github.io/process-compose/configuration/"
},
{
"keywords": [],
"url": "https://docs.nomic.io/network/ibc-relayer"
},
{
"keywords": [],
"url": "https://www.jetify.com/docs/devbox"
},
{
"keywords": [],
"url": "https://taskfile.dev/reference/cli"
},
{
"keywords": [],
"url": "https://taskfile.dev/reference/schema"
},
{
"keywords": [],
"url": "https://taskfile.dev/reference/templating/"
}
] ]
}, },
{ {
"name": "repo/docs", "name": "repo/docs",
"path": "docs", "path": "docs",
"docs": [ "docs": [
"https://squidfunk.github.io/mkdocs-material/reference/", {
"https://github.com/mkdocs/catalog/blob/main/README.md" "keywords": [],
"url": "https://squidfunk.github.io/mkdocs-material/reference/"
},
{
"keywords": [],
"url": "https://github.com/mkdocs/catalog/blob/main/README.md"
}
] ]
} }
] ]

View File

@ -6,7 +6,7 @@ ROOT_DIR=$(git rev-parse --show-toplevel)
# Extract scope name and path using jq, and pass it to fzf for selection # Extract scope name and path using jq, and pass it to fzf for selection
SCOPE=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r '.[] | "\(.name)"' | fzf --prompt "Select scope:") SCOPE=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r '.[] | "\(.name)"' | fzf --prompt "Select scope:")
DOCS=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r ".[] | select(.name == \"$SCOPE\") | .docs[]") DOCS=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r ".[] | select(.name == \"$SCOPE\") | .docs[].url")
# Write Title # Write Title
TITLE=$(gum input --placeholder "Issue Title...") TITLE=$(gum input --placeholder "Issue Title...")
@ -38,9 +38,9 @@ create_body() {
echo "$(($i + 1)). ${REQUIREMENTS[$i]}" echo "$(($i + 1)). ${REQUIREMENTS[$i]}"
done done
echo "### Resources:" echo "### Resources:"
for doc in "${DOCS[@]}"; do while IFS= read -r doc; do
echo "- $doc" echo "- $doc"
done done <<< "$DOCS"
} }
ISSUE_BODY=$(create_body) ISSUE_BODY=$(create_body)

4
.gitignore vendored
View File

@ -60,6 +60,10 @@ override.tf.json
.terraformrc .terraformrc
terraform.rc terraform.rc
Taskfile.yml
!deploy/**/Taskfile.yml
# Misc # Misc
.DS_Store .DS_Store
.tmp/ .tmp/