From 263e188f58dbe032eeab69473f7fa959f7260dca Mon Sep 17 00:00:00 2001 From: wangzp Date: Fri, 7 Aug 2026 11:54:33 +0800 Subject: [PATCH] fix: correct release and repository links --- CHANGELOG.md | 23 +++++++++++-------- CHANGELOG.zh-CN.md | 23 +++++++++++-------- Cargo.toml | 6 ++--- README.md | 18 +++++++-------- README.zh-CN.md | 18 +++++++-------- docs/AUTOMATION_CONTRACTS.md | 5 ++++ docs/DEVELOPMENT.md | 2 +- docs/USER_GUIDE.md | 13 +++++------ docs/zh-CN/AUTOMATION_CONTRACTS.md | 5 ++++ docs/zh-CN/DEVELOPMENT.md | 2 +- docs/zh-CN/USER_GUIDE.md | 12 ++++------ install.ps1 | 2 +- install.sh | 2 +- .../references/capability-roster.md | 2 +- .../references/zh-CN/capability-roster.md | 2 +- src/commands/automation_commands.rs | 4 ++-- tests/automation_protocol/workspace.rs | 8 +++++++ 17 files changed, 86 insertions(+), 61 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd3f427..6f39ed7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ This project follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) an ## [Unreleased] +### Fixed + +- Corrected repository metadata, installer downloads, release and attestation links, and automation schema identifiers to use `ovaso/batch-git-rs`. Release badges now select the latest semantic-version tag, and installation documentation no longer advertises the crate before it is published to crates.io. + ## [0.4.4] - 2026-08-07 ### Added @@ -188,12 +192,13 @@ First stable release. - Batch operations provide no cross-repository transactional rollback and may partially succeed. - Interactive Git children require `--jobs 1`. -[Unreleased]: https://github.com/livenv/batch-git/compare/v0.4.3...HEAD -[0.4.3]: https://github.com/livenv/batch-git/compare/v0.4.2...v0.4.3 -[0.4.2]: https://github.com/livenv/batch-git/compare/v0.4.1...v0.4.2 -[0.4.1]: https://github.com/livenv/batch-git/compare/v0.4.0...v0.4.1 -[0.4.0]: https://github.com/livenv/batch-git/compare/v0.3.0...v0.4.0 -[0.3.0]: https://github.com/livenv/batch-git/compare/v0.2.0...v0.3.0 -[0.2.0]: https://github.com/livenv/batch-git/compare/v0.1.1...v0.2.0 -[0.1.1]: https://github.com/livenv/batch-git/compare/v0.1.0...v0.1.1 -[0.1.0]: https://github.com/livenv/batch-git/releases/tag/v0.1.0 +[Unreleased]: https://github.com/ovaso/batch-git-rs/compare/v0.4.4...HEAD +[0.4.4]: https://github.com/ovaso/batch-git-rs/compare/v0.4.3...v0.4.4 +[0.4.3]: https://github.com/ovaso/batch-git-rs/compare/v0.4.2...v0.4.3 +[0.4.2]: https://github.com/ovaso/batch-git-rs/compare/v0.4.1...v0.4.2 +[0.4.1]: https://github.com/ovaso/batch-git-rs/compare/v0.4.0...v0.4.1 +[0.4.0]: https://github.com/ovaso/batch-git-rs/compare/v0.3.0...v0.4.0 +[0.3.0]: https://github.com/ovaso/batch-git-rs/compare/v0.2.0...v0.3.0 +[0.2.0]: https://github.com/ovaso/batch-git-rs/compare/v0.1.1...v0.2.0 +[0.1.1]: https://github.com/ovaso/batch-git-rs/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/ovaso/batch-git-rs/releases/tag/v0.1.0 diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index dbc4c99..32993c9 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -7,6 +7,10 @@ ## [Unreleased] +### Fixed + +- 修正包元数据、安装器下载、release/attestation 链接和自动化 schema 标识,统一指向 `ovaso/batch-git-rs`;release badge 改为按语义版本选择最新 tag,安装文档不再在 crate 发布到 crates.io 之前宣称可直接安装。 + ## [0.4.4] - 2026-08-07 ### Added @@ -248,12 +252,13 @@ - 批量操作不提供跨仓库事务回滚,失败时可能部分成功; - 交互式 Git 子进程需使用 `--jobs 1`。 -[Unreleased]: https://github.com/livenv/batch-git/compare/v0.4.3...HEAD -[0.4.3]: https://github.com/livenv/batch-git/compare/v0.4.2...v0.4.3 -[0.4.2]: https://github.com/livenv/batch-git/compare/v0.4.1...v0.4.2 -[0.4.1]: https://github.com/livenv/batch-git/compare/v0.4.0...v0.4.1 -[0.4.0]: https://github.com/livenv/batch-git/compare/v0.3.0...v0.4.0 -[0.3.0]: https://github.com/livenv/batch-git/compare/v0.2.0...v0.3.0 -[0.2.0]: https://github.com/livenv/batch-git/compare/v0.1.1...v0.2.0 -[0.1.1]: https://github.com/livenv/batch-git/compare/v0.1.0...v0.1.1 -[0.1.0]: https://github.com/livenv/batch-git/releases/tag/v0.1.0 +[Unreleased]: https://github.com/ovaso/batch-git-rs/compare/v0.4.4...HEAD +[0.4.4]: https://github.com/ovaso/batch-git-rs/compare/v0.4.3...v0.4.4 +[0.4.3]: https://github.com/ovaso/batch-git-rs/compare/v0.4.2...v0.4.3 +[0.4.2]: https://github.com/ovaso/batch-git-rs/compare/v0.4.1...v0.4.2 +[0.4.1]: https://github.com/ovaso/batch-git-rs/compare/v0.4.0...v0.4.1 +[0.4.0]: https://github.com/ovaso/batch-git-rs/compare/v0.3.0...v0.4.0 +[0.3.0]: https://github.com/ovaso/batch-git-rs/compare/v0.2.0...v0.3.0 +[0.2.0]: https://github.com/ovaso/batch-git-rs/compare/v0.1.1...v0.2.0 +[0.1.1]: https://github.com/ovaso/batch-git-rs/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/ovaso/batch-git-rs/releases/tag/v0.1.0 diff --git a/Cargo.toml b/Cargo.toml index 38d3f6d..ac905c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,9 +5,9 @@ edition = "2024" license = "MIT" description = "Safe, declarative management of workspaces containing multiple Git repositories" readme = "README.md" -repository = "https://github.com/livenv/batch-git" -homepage = "https://github.com/livenv/batch-git" -documentation = "https://github.com/livenv/batch-git/tree/main/docs" +repository = "https://github.com/ovaso/batch-git-rs" +homepage = "https://github.com/ovaso/batch-git-rs" +documentation = "https://github.com/ovaso/batch-git-rs/tree/main/docs" keywords = ["git", "workspace", "monorepo", "automation", "cli"] categories = ["command-line-utilities", "development-tools"] rust-version = "1.88" diff --git a/README.md b/README.md index 82ad9aa..751784f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # batch-git [![CI](https://github.com/ovaso/batch-git-rs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ovaso/batch-git-rs/actions/workflows/ci.yml) -[![Release](https://img.shields.io/github/v/release/ovaso/batch-git-rs)](https://github.com/ovaso/batch-git-rs/releases) +[![Release](https://img.shields.io/github/v/release/ovaso/batch-git-rs?sort=semver&display_name=tag)](https://github.com/ovaso/batch-git-rs/releases/latest) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [简体中文](README.zh-CN.md) @@ -36,7 +36,7 @@ require an explicit version: ```sh # macOS / Linux: download and review the installer before installing to ~/.local. VERSION=vX.Y.Z -curl -LO "https://github.com/livenv/batch-git/releases/download/$VERSION/install.sh" +curl -LO "https://github.com/ovaso/batch-git-rs/releases/download/$VERSION/install.sh" sh install.sh --version "$VERSION" # Optional: install to another user-writable prefix. @@ -47,24 +47,24 @@ PowerShell: ```powershell $Version = "vX.Y.Z" -Invoke-WebRequest "https://github.com/livenv/batch-git/releases/download/$Version/install.ps1" -OutFile install.ps1 +Invoke-WebRequest "https://github.com/ovaso/batch-git-rs/releases/download/$Version/install.ps1" -OutFile install.ps1 .\install.ps1 -Version $Version ``` The installers verify the SHA-256 file published beside each archive. You can also download and -verify an archive manually from [GitHub Releases](https://github.com/livenv/batch-git/releases). +verify an archive manually from [GitHub Releases](https://github.com/ovaso/batch-git-rs/releases). If GitHub CLI is available, verify the signed provenance as well: ```sh -gh attestation verify batch-git-.tar.gz --repo livenv/batch-git +gh attestation verify batch-git-.tar.gz --repo ovaso/batch-git-rs ``` -Building from source requires a Rust toolchain and system Git: +The crate is not published to crates.io yet. Use the release installers above, or build from a +checked-out source tree with a Rust toolchain and system Git: ```sh -# Install from crates.io, or let cargo-binstall use the release metadata. -cargo install --locked batch-git -cargo binstall batch-git +# Install the current checkout. +cargo install --locked --path . # Build only. cargo build --release diff --git a/README.zh-CN.md b/README.zh-CN.md index 9cbf908..e864d69 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,7 +1,7 @@ # batch-git [![CI](https://github.com/ovaso/batch-git-rs/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ovaso/batch-git-rs/actions/workflows/ci.yml) -[![Release](https://img.shields.io/github/v/release/ovaso/batch-git-rs)](https://github.com/ovaso/batch-git-rs/releases) +[![Release](https://img.shields.io/github/v/release/ovaso/batch-git-rs?sort=semver&display_name=tag)](https://github.com/ovaso/batch-git-rs/releases/latest) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [English](README.md) @@ -34,7 +34,7 @@ SHA-256 校验和及 GitHub artifact attestation。安装器不会使用 `sudo` ```sh # macOS / Linux:先下载并审阅安装器,再安装到 ~/.local。 VERSION=vX.Y.Z -curl -LO "https://github.com/livenv/batch-git/releases/download/$VERSION/install.sh" +curl -LO "https://github.com/ovaso/batch-git-rs/releases/download/$VERSION/install.sh" sh install.sh --version "$VERSION" # 可选:安装到其他用户可写前缀。 @@ -45,23 +45,23 @@ PowerShell: ```powershell $Version = "vX.Y.Z" -Invoke-WebRequest "https://github.com/livenv/batch-git/releases/download/$Version/install.ps1" -OutFile install.ps1 +Invoke-WebRequest "https://github.com/ovaso/batch-git-rs/releases/download/$Version/install.ps1" -OutFile install.ps1 .\install.ps1 -Version $Version ``` -安装器会验证与归档一同发布的 SHA-256。也可从 [GitHub Releases](https://github.com/livenv/batch-git/releases) +安装器会验证与归档一同发布的 SHA-256。也可从 [GitHub Releases](https://github.com/ovaso/batch-git-rs/releases) 手工下载并校验;如已安装 GitHub CLI,可进一步验证签名 provenance: ```sh -gh attestation verify batch-git-.tar.gz --repo livenv/batch-git +gh attestation verify batch-git-.tar.gz --repo ovaso/batch-git-rs ``` -从源码构建需要 Rust 工具链和系统 Git: +当前 crate 尚未发布到 crates.io。请使用上述 release 安装器,或在已 checkout 的源码目录中 +使用 Rust 工具链和系统 Git 构建: ```sh -# crates.io 安装;也可用 cargo-binstall 读取 release 元数据安装预编译归档。 -cargo install --locked batch-git -cargo binstall batch-git +# 安装当前 checkout。 +cargo install --locked --path . # 仅构建 cargo build --release diff --git a/docs/AUTOMATION_CONTRACTS.md b/docs/AUTOMATION_CONTRACTS.md index f518d4f..7d105d8 100644 --- a/docs/AUTOMATION_CONTRACTS.md +++ b/docs/AUTOMATION_CONTRACTS.md @@ -250,6 +250,11 @@ filled in. It accepts omitted defaults such as empty `repositories` / `schedules `enabled`, `action`, `timezone`, and `overlap`. The schema uses `additionalProperties: true`, so consumers should validate core fields while allowing future additions. +The canonical schema identifiers are +`https://github.com/ovaso/batch-git-rs/schemas/operation-result-v1.json` and +`https://github.com/ovaso/batch-git-rs/schemas/workspace-v1.json`. Treat `$id` as the stable schema +identifier returned by the binary; obtain the actual current document through the `schema` command. + ## Command coverage and legacy JSON Every public command—including `env list` / `env ls`, `scan`, `clone`, `restore`, `add`, `commit`, diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index aa019e1..12c134d 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -110,7 +110,7 @@ When adding or changing CLI arguments, check together: - [ ] The release commit reached `main` through a pull request and all required checks passed. - [ ] The remote `v*` tag points at that exact merged release commit. - [ ] The tag, GitHub Release, binary names, and SHA-256 checksums agree. -- [ ] `gh attestation verify --repo livenv/batch-git` verifies the release archive. +- [ ] `gh attestation verify --repo ovaso/batch-git-rs` verifies the release archive. - [ ] `sh -n install.sh`, the PowerShell parser, and all four completion checks pass. - [ ] English and Simplified Chinese documentation links are valid and translations are synchronized. - [ ] `SECURITY.md`, `COMPATIBILITY.md`, and the automation contracts still match behavior. diff --git a/docs/USER_GUIDE.md b/docs/USER_GUIDE.md index 5ef0cdf..b2c1478 100644 --- a/docs/USER_GUIDE.md +++ b/docs/USER_GUIDE.md @@ -42,13 +42,13 @@ default: ```sh VERSION=vX.Y.Z -curl -LO "https://github.com/livenv/batch-git/releases/download/$VERSION/install.sh" +curl -LO "https://github.com/ovaso/batch-git-rs/releases/download/$VERSION/install.sh" sh install.sh --version "$VERSION" ``` ```powershell $Version = "vX.Y.Z" -Invoke-WebRequest "https://github.com/livenv/batch-git/releases/download/$Version/install.ps1" -OutFile install.ps1 +Invoke-WebRequest "https://github.com/ovaso/batch-git-rs/releases/download/$Version/install.ps1" -OutFile install.ps1 .\install.ps1 -Version $Version ``` @@ -56,7 +56,7 @@ For manual installation, download the matching `.sha256` or combined `SHA256SUMS verify build provenance signed by the release workflow: ```sh -gh attestation verify batch-git-.tar.gz --repo livenv/batch-git +gh attestation verify batch-git-.tar.gz --repo ovaso/batch-git-rs ``` Archives contain `completions/`. The Unix installer installs Bash, Zsh, and Fish completions. If a @@ -66,12 +66,11 @@ custom prefix is not in the shell's default search path, add `/share/zsh ### 2.2 Building from source -Source builds additionally require Rust 1.88 or newer: +The crate is not published to crates.io yet. Source installation requires a checked-out copy of the +repository and Rust 1.88 or newer: ```sh -cargo install --locked batch-git -# When cargo-binstall is installed, it can select the prebuilt archive from release metadata: -cargo binstall batch-git +cargo install --locked --path . cargo build --release ./target/release/batch-git --help diff --git a/docs/zh-CN/AUTOMATION_CONTRACTS.md b/docs/zh-CN/AUTOMATION_CONTRACTS.md index f0896b5..5ce3688 100644 --- a/docs/zh-CN/AUTOMATION_CONTRACTS.md +++ b/docs/zh-CN/AUTOMATION_CONTRACTS.md @@ -226,6 +226,11 @@ batch-git --output json schema workspace `action`、`timezone` 和 `overlap`。Schema 使用 `additionalProperties: true`,因此消费者应验证 核心字段但允许未来新增字段。 +规范 schema 标识分别为 +`https://github.com/ovaso/batch-git-rs/schemas/operation-result-v1.json` 和 +`https://github.com/ovaso/batch-git-rs/schemas/workspace-v1.json`。`$id` 是二进制返回的稳定 +schema 标识;实际当前文档应通过 `schema` 命令获取。 + ## 命令覆盖与旧 JSON 所有公开命令(包括 `env list` / `env ls`、`scan`、`clone`、`restore`、`add`、`commit`、 diff --git a/docs/zh-CN/DEVELOPMENT.md b/docs/zh-CN/DEVELOPMENT.md index e5183fa..a5206af 100644 --- a/docs/zh-CN/DEVELOPMENT.md +++ b/docs/zh-CN/DEVELOPMENT.md @@ -107,7 +107,7 @@ GitHub Release。 - [ ] release 提交通过 pull request 进入 `main`,且所有必需检查均通过; - [ ] 远端 `v*` tag 精确指向该合并后的 release 提交; - [ ] tag、GitHub Release、二进制名与 SHA-256 校验和相互对应; -- [ ] `gh attestation verify --repo livenv/batch-git` 能验证发布归档; +- [ ] `gh attestation verify --repo ovaso/batch-git-rs` 能验证发布归档; - [ ] `sh -n install.sh`、PowerShell parser 和四种补全文件检查通过; - [ ] 中英文文档链接有效且翻译保持同步; - [ ] `SECURITY.md`、`COMPATIBILITY.md` 和 automation contracts 仍与行为一致。 diff --git a/docs/zh-CN/USER_GUIDE.md b/docs/zh-CN/USER_GUIDE.md index 777a841..251393e 100644 --- a/docs/zh-CN/USER_GUIDE.md +++ b/docs/zh-CN/USER_GUIDE.md @@ -41,13 +41,13 @@ Linux x86_64、macOS x86_64/arm64 和 Windows x86_64 可使用正式 release。 ```sh VERSION=vX.Y.Z -curl -LO "https://github.com/livenv/batch-git/releases/download/$VERSION/install.sh" +curl -LO "https://github.com/ovaso/batch-git-rs/releases/download/$VERSION/install.sh" sh install.sh --version "$VERSION" ``` ```powershell $Version = "vX.Y.Z" -Invoke-WebRequest "https://github.com/livenv/batch-git/releases/download/$Version/install.ps1" -OutFile install.ps1 +Invoke-WebRequest "https://github.com/ovaso/batch-git-rs/releases/download/$Version/install.ps1" -OutFile install.ps1 .\install.ps1 -Version $Version ``` @@ -55,7 +55,7 @@ Invoke-WebRequest "https://github.com/livenv/batch-git/releases/download/$Versio 签发的构建 provenance: ```sh -gh attestation verify batch-git-.tar.gz --repo livenv/batch-git +gh attestation verify batch-git-.tar.gz --repo ovaso/batch-git-rs ``` 归档包含 `completions/`。Unix 安装器会安装 Bash、Zsh 和 Fish 补全;如果自定义前缀不在 shell @@ -64,12 +64,10 @@ PowerShell 可 dot-source `\share\batch-git\completions\batch-git.ps1` ### 2.2 从源码构建 -源码构建另需 Rust 1.88 或更新工具链: +当前 crate 尚未发布到 crates.io。从源码安装需要已 checkout 的仓库和 Rust 1.88 或更新工具链: ```sh -cargo install --locked batch-git -# 已安装 cargo-binstall 时,可按 release 元数据选择预编译归档: -cargo binstall batch-git +cargo install --locked --path . cargo build --release ./target/release/batch-git --help diff --git a/install.ps1 b/install.ps1 index cb1c925..3a59d81 100644 --- a/install.ps1 +++ b/install.ps1 @@ -6,7 +6,7 @@ param( ) $ErrorActionPreference = "Stop" -$Repository = "livenv/batch-git" +$Repository = "ovaso/batch-git-rs" $Target = "x86_64-pc-windows-msvc" $Archive = "batch-git-$Target.tar.gz" diff --git a/install.sh b/install.sh index f61079e..d4345c5 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/bin/sh set -eu -repository="livenv/batch-git" +repository="ovaso/batch-git-rs" version="" prefix="${BATCH_GIT_INSTALL_PREFIX:-${HOME:?HOME is required}/.local}" diff --git a/skills/batch-git-automation/references/capability-roster.md b/skills/batch-git-automation/references/capability-roster.md index 340e08a..4a57c7a 100644 --- a/skills/batch-git-automation/references/capability-roster.md +++ b/skills/batch-git-automation/references/capability-roster.md @@ -13,7 +13,7 @@ capabilities below apply only when `commands` actually contains `schedule`. | Capability | Command | Agent rule | |---|---|---| | Capability discovery | `capabilities` | Starting point in every new environment; read protocol version, formats, commands, and safety boundaries. | -| Schema discovery | `schema operation-result`, `schema workspace` | Validate core receipt fields while allowing future optional fields. The workspace schema accepts omitted default manifest fields. | +| Schema discovery | `schema operation-result`, `schema workspace` | Validate core receipt fields while allowing future optional fields. The workspace schema accepts omitted default manifest fields; canonical `$id` values use the `https://github.com/ovaso/batch-git-rs/schemas/` namespace. | | Single receipt | `--output json ` | Default for new automation; stdout contains exactly one v1 JSON document. | | Long-task events | `--output jsonl ` | Consume `started`, `repository_finished`, `finished`. Batch operations and single clone emit repository terminal events in manifest order, not completion order. Decide from the final event and exit code. | | Correlation | `--request-id ` | Echo the caller's 1–128-character non-control ID into all machine output. | diff --git a/skills/batch-git-automation/references/zh-CN/capability-roster.md b/skills/batch-git-automation/references/zh-CN/capability-roster.md index 5e5892b..55e9bbe 100644 --- a/skills/batch-git-automation/references/zh-CN/capability-roster.md +++ b/skills/batch-git-automation/references/zh-CN/capability-roster.md @@ -13,7 +13,7 @@ | 能力 | 命令 | agent 使用规则 | |---|---|---| | 能力发现 | `capabilities` | 每次新环境的起点;读取协议版本、格式、命令、安全边界。 | -| schema 发现 | `schema operation-result`、`schema workspace` | 校验 receipt 核心字段,同时允许 future optional fields;workspace schema 接受省略的默认清单字段。 | +| schema 发现 | `schema operation-result`、`schema workspace` | 校验 receipt 核心字段,同时允许 future optional fields;workspace schema 接受省略的默认清单字段,规范 `$id` 使用 `https://github.com/ovaso/batch-git-rs/schemas/` 命名空间。 | | 一次性 receipt | `--output json ` | 新自动化的默认格式;stdout 只能有一个 v1 JSON 文档。 | | 长任务事件 | `--output jsonl ` | 消费 `started`、`repository_finished`、`finished`;批量操作及单仓库 `clone` 都产生仓库终态事件,事件按清单顺序输出而非完成时间顺序;以最终事件和退出码结论。 | | 关联追踪 | `--request-id ` | 将调用方的 1–128 字符非控制 ID 回显到所有 machine output。 | diff --git a/src/commands/automation_commands.rs b/src/commands/automation_commands.rs index 14bed94..65b53f3 100644 --- a/src/commands/automation_commands.rs +++ b/src/commands/automation_commands.rs @@ -149,7 +149,7 @@ pub(super) fn schema(arguments: SchemaArgs, automation: &AutomationOptions) -> R fn operation_result_schema() -> serde_json::Value { json!({ "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/livenv/batch-git/schemas/operation-result-v1.json", + "$id": "https://github.com/ovaso/batch-git-rs/schemas/operation-result-v1.json", "title": "batch-git automation result v1", "type": "object", "required": ["api_version", "command", "exit_code", "ok", "data", "error"], @@ -190,7 +190,7 @@ fn operation_result_schema() -> serde_json::Value { fn workspace_schema() -> serde_json::Value { json!({ "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://github.com/livenv/batch-git/schemas/workspace-v1.json", + "$id": "https://github.com/ovaso/batch-git-rs/schemas/workspace-v1.json", "title": "workspace.toml v1 JSON representation", "type": "object", "required": ["version", "created_at", "updated_at"], diff --git a/tests/automation_protocol/workspace.rs b/tests/automation_protocol/workspace.rs index 2f1b14f..bf19739 100644 --- a/tests/automation_protocol/workspace.rs +++ b/tests/automation_protocol/workspace.rs @@ -143,6 +143,10 @@ fn workspace_schema_keeps_defaulted_fields_optional() { assert_success_receipt(&receipt, "schema"); let schema = &receipt["data"]; + assert_eq!( + schema["$id"], + "https://github.com/ovaso/batch-git-rs/schemas/workspace-v1.json" + ); assert_schema_requires(schema, &["version", "created_at", "updated_at"]); assert_schema_omits_required(schema, &["repositories", "schedules"]); @@ -168,6 +172,10 @@ fn operation_result_schema_requires_the_nullable_error_field() { assert_success_receipt(&receipt, "schema"); let schema = &receipt["data"]; + assert_eq!( + schema["$id"], + "https://github.com/ovaso/batch-git-rs/schemas/operation-result-v1.json" + ); assert_schema_requires( schema, &["api_version", "command", "exit_code", "ok", "data", "error"],