Skip to content
Draft
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 4 additions & 70 deletions .github/workflows/update-version-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,75 +23,9 @@ jobs:
- name: Set up Nix
uses: cachix/install-nix-action@v31

- name: Update version dashboard
run: nix-shell --run 'npm run generate:version-compatibility-dashboard'

- name: Detect changes
id: changes
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "has_changes=true" >> "$GITHUB_OUTPUT"
git status --short
git diff --stat
else
echo "has_changes=false" >> "$GITHUB_OUTPUT"
fi

- name: Check whitespace
if: steps.changes.outputs.has_changes == 'true'
run: git diff --check

- name: Create or update pull request
if: steps.changes.outputs.has_changes == 'true'
- name: Generate update pull requests
env:
GH_TOKEN: ${{ github.token }}
PR_BRANCH: version-dashboard/update
PR_TITLE: Update version dashboard data
run: |
set -euo pipefail

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git switch -c "$PR_BRANCH"
git add config/repo-version-config.json docs-main/snippets/generated/version-dashboard-data.mdx
git commit -m "$PR_TITLE"

if remote_sha="$(git ls-remote --heads origin "$PR_BRANCH" | awk '{print $1}')" && [[ -n "$remote_sha" ]]; then
git push --force-with-lease="refs/heads/$PR_BRANCH:$remote_sha" origin "HEAD:$PR_BRANCH"
else
git push origin "HEAD:$PR_BRANCH"
fi

pr_body="$(mktemp)"
cat > "$pr_body" <<'EOF'
Updates the committed Canton Network version dashboard data from public network, package, and installer sources.

Validation run by the workflow:
- `npm run generate:version-compatibility-dashboard`
- `git diff --check`
EOF

existing_pr_number="$(
gh pr list \
--repo "$GITHUB_REPOSITORY" \
--head "$PR_BRANCH" \
--base main \
--state open \
--json number \
--jq '.[0].number // empty'
)"

if [[ -n "$existing_pr_number" ]]; then
gh pr edit "$existing_pr_number" \
--repo "$GITHUB_REPOSITORY" \
--title "$PR_TITLE" \
--body-file "$pr_body"
else
gh pr create \
--base main \
--head "$PR_BRANCH" \
--repo "$GITHUB_REPOSITORY" \
--title "$PR_TITLE" \
--body-file "$pr_body"
fi
GITHUB_TOKEN: ${{ github.token }}
PR_BASE_BRANCH: ${{ github.ref_name }}
run: python3 scripts/update_generated_reference_prs.py
2 changes: 1 addition & 1 deletion config/x2mdx/wallet-gateway-openrpc/source-artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"remote": "https://github.com/hyperledger-labs/splice-wallet-kernel.git",
"tag_prefix": "@canton-network/wallet-gateway-remote@",
"min_version": "0.24.0",
"publish_version": "0.25.0",
"publish_version": "1.4.0",
"specs": [
{
"spec_id": "dapp-api",
Expand Down
11 changes: 11 additions & 0 deletions docs-main/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1499,8 +1499,10 @@
"reference/wallet-gateway-json-rpc/operations/dapp-api/disconnect",
"reference/wallet-gateway-json-rpc/operations/dapp-api/getactivenetwork",
"reference/wallet-gateway-json-rpc/operations/dapp-api/getprimaryaccount",
"reference/wallet-gateway-json-rpc/operations/dapp-api/isconnected",
"reference/wallet-gateway-json-rpc/operations/dapp-api/ledgerapi",
"reference/wallet-gateway-json-rpc/operations/dapp-api/listaccounts",
"reference/wallet-gateway-json-rpc/operations/dapp-api/messagesignature",
"reference/wallet-gateway-json-rpc/operations/dapp-api/prepareexecute",
"reference/wallet-gateway-json-rpc/operations/dapp-api/prepareexecuteandwait",
"reference/wallet-gateway-json-rpc/operations/dapp-api/signmessage",
Expand All @@ -1518,8 +1520,10 @@
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/disconnect",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/getactivenetwork",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/getprimaryaccount",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/isconnected",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/ledgerapi",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/listaccounts",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/messagesignature",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/onstatuschanged",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/prepareexecute",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/signmessage",
Expand All @@ -1541,12 +1545,16 @@
"reference/wallet-gateway-json-rpc/operations/user-api/addsession",
"reference/wallet-gateway-json-rpc/operations/user-api/allocatepartyforwallet",
"reference/wallet-gateway-json-rpc/operations/user-api/createwallet",
"reference/wallet-gateway-json-rpc/operations/user-api/deletemessagetosign",
"reference/wallet-gateway-json-rpc/operations/user-api/deletetransaction",
"reference/wallet-gateway-json-rpc/operations/user-api/execute",
"reference/wallet-gateway-json-rpc/operations/user-api/getmessagetosign",
"reference/wallet-gateway-json-rpc/operations/user-api/getnetwork",
"reference/wallet-gateway-json-rpc/operations/user-api/gettransaction",
"reference/wallet-gateway-json-rpc/operations/user-api/getuser",
"reference/wallet-gateway-json-rpc/operations/user-api/iswalletsyncneeded",
"reference/wallet-gateway-json-rpc/operations/user-api/listidps",
"reference/wallet-gateway-json-rpc/operations/user-api/listmessagestosign",
"reference/wallet-gateway-json-rpc/operations/user-api/listnetworks",
"reference/wallet-gateway-json-rpc/operations/user-api/listsessions",
"reference/wallet-gateway-json-rpc/operations/user-api/listtransactions",
Expand All @@ -1555,8 +1563,10 @@
"reference/wallet-gateway-json-rpc/operations/user-api/removenetwork",
"reference/wallet-gateway-json-rpc/operations/user-api/removesession",
"reference/wallet-gateway-json-rpc/operations/user-api/removewallet",
"reference/wallet-gateway-json-rpc/operations/user-api/selfsignedaccesstoken",
"reference/wallet-gateway-json-rpc/operations/user-api/setprimarywallet",
"reference/wallet-gateway-json-rpc/operations/user-api/sign",
"reference/wallet-gateway-json-rpc/operations/user-api/signmessage",
"reference/wallet-gateway-json-rpc/operations/user-api/syncwallets",
"reference/wallet-gateway-json-rpc/operations/user-api/details"
]
Expand All @@ -1570,6 +1580,7 @@
"reference/wallet-gateway-json-rpc/operations/signing-api/gettransaction",
"reference/wallet-gateway-json-rpc/operations/signing-api/gettransactions",
"reference/wallet-gateway-json-rpc/operations/signing-api/setconfiguration",
"reference/wallet-gateway-json-rpc/operations/signing-api/signmessage",
"reference/wallet-gateway-json-rpc/operations/signing-api/signtransaction",
"reference/wallet-gateway-json-rpc/operations/signing-api/subscribetransactions",
"reference/wallet-gateway-json-rpc/operations/signing-api/details"
Expand Down
Loading