From 32d783efa33b5f4b442c3e0c496b56b0247b68b7 Mon Sep 17 00:00:00 2001 From: jonathanayubausara-a11y Date: Tue, 28 Jul 2026 17:22:57 +0000 Subject: [PATCH 1/4] fix: adopt cargo workspace inheritance for all crate metadata (#101) Closes #101 - campaign/Cargo.toml: use version.workspace, edition.workspace, rust-version.workspace, license.workspace - common/Cargo.toml: same - token-bridge/Cargo.toml: same - crates/contracts/batch-donor/Cargo.toml: same All four crates now inherit shared metadata from [workspace.package] consistent with core and tools crates. --- campaign/Cargo.toml | 7 ++++--- common/Cargo.toml | 7 ++++--- crates/contracts/batch-donor/Cargo.toml | 7 ++++--- token-bridge/Cargo.toml | 7 ++++--- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/campaign/Cargo.toml b/campaign/Cargo.toml index b7a22196..e91da883 100644 --- a/campaign/Cargo.toml +++ b/campaign/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "orbitchain-campaign" -version = "0.1.0" -edition = "2021" -license = "MIT" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true description = "OrbitChain campaign smart contract — milestones, donations, refunds, and lifecycle" [lib] diff --git a/common/Cargo.toml b/common/Cargo.toml index d4de44b0..8ebb5a26 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "orbitchain-common" -version = "0.1.0" -edition = "2021" -license = "MIT" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true description = "OrbitChain common types — shared CampaignStatus, MilestoneStatus, and AssetInfo" [lib] diff --git a/crates/contracts/batch-donor/Cargo.toml b/crates/contracts/batch-donor/Cargo.toml index 3e57b060..f5b428d5 100644 --- a/crates/contracts/batch-donor/Cargo.toml +++ b/crates/contracts/batch-donor/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "orbitchain-batch-donor" -version = "0.1.0" -edition = "2021" -license = "MIT" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true description = "OrbitChain batch-donor contract — atomic multi-campaign donations in a single Soroban transaction. Closes #147." [lib] diff --git a/token-bridge/Cargo.toml b/token-bridge/Cargo.toml index b40633f0..3137299f 100644 --- a/token-bridge/Cargo.toml +++ b/token-bridge/Cargo.toml @@ -1,8 +1,9 @@ [package] name = "orbitchain-token-bridge" -version = "0.1.0" -edition = "2021" -license = "MIT" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true description = "OrbitChain cross-chain token bridge contract" [lib] From a11edd702e70213f255a178fa22baf4dbacfd6ee Mon Sep 17 00:00:00 2001 From: jonathanayubausara-a11y Date: Tue, 28 Jul 2026 20:38:32 +0000 Subject: [PATCH 2/4] fix(ci): upgrade labeler config to actions/labeler v5 format The v5 schema requires each label entry to be an object with matchers (any-to-match / all-to-match) instead of bare glob strings. Fixes the "found unexpected type for label 'api' (should be array of config options)" error that blocked the labeler workflow on PR #213. --- .github/labeler.yml | 64 +++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 8d4e43d3..b29a8814 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -12,52 +12,60 @@ # Rust Soroban contracts — the canonical on-chain API surface. api: - - "campaign/**" - - "common/**" - - "token-bridge/**" - - "crates/contracts/core/**" - - "crates/contracts/batch-donor/**" + - any-to-match: + - "campaign/**" + - "common/**" + - "token-bridge/**" + - "crates/contracts/core/**" + - "crates/contracts/batch-donor/**" # Native CLI tooling (`cargo run -p orbitchain-tools -- …`). cli: - - "crates/tools/**" + - any-to-match: + - "crates/tools/**" # Frontend / mobile-wallet surfaces (Playwright + wallet integration). frontend: - - "wallet_connect.html" - - "wallet_connect.js" - - "tests/e2e/**" - - "playwright.config.js" + - any-to-match: + - "wallet_connect.html" + - "wallet_connect.js" + - "tests/e2e/**" + - "playwright.config.js" # CI / build infrastructure. ci: - - ".github/workflows/**" - - ".github/*.md" - - ".github/ISSUE_TEMPLATE/**" - - ".cargo/**" - - "rust-toolchain.toml" - - "Cargo.toml" - - "Cargo.lock" + - any-to-match: + - ".github/workflows/**" + - ".github/*.md" + - ".github/ISSUE_TEMPLATE/**" + - ".cargo/**" + - "rust-toolchain.toml" + - "Cargo.toml" + - "Cargo.lock" # Documentation and reference material. documentation: - - "docs/**" - - "**/*.md" + - any-to-match: + - "docs/**" + - "**/*.md" # Persistent / temporary storage backend code paths. storage: - - "**/storage*.rs" - - "**/backend.rs" + - any-to-match: + - "**/storage*.rs" + - "**/backend.rs" # Tests / property-based / fuzz harnesses. testing: - - "**/tests/**" - - "**/*test*.rs" - - "**/proptest-strategies/**" - - "**/fuzz_targets/**" - - "fuzz/**" + - any-to-match: + - "**/tests/**" + - "**/*test*.rs" + - "**/proptest-strategies/**" + - "**/fuzz_targets/**" + - "fuzz/**" # Security process and security-sensitive code. security: - - "SECURITY.md" - - "**/security*.rs" + - any-to-match: + - "SECURITY.md" + - "**/security*.rs" From b02e88d7243c877bc5720a68a0ac693ed22517e7 Mon Sep 17 00:00:00 2001 From: jonathanayubausara-a11y Date: Tue, 28 Jul 2026 20:41:23 +0000 Subject: [PATCH 3/4] fix(ci): use correct v5 schema changed-files/any-glob-to-any-file The v5 format requires: label: - changed-files: - any-glob-to-any-file: ['glob1', 'glob2'] Not the informal any-to-match key used previously. --- .github/labeler.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index b29a8814..1e39ac8f 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -12,7 +12,8 @@ # Rust Soroban contracts — the canonical on-chain API surface. api: - - any-to-match: + - changed-files: + - any-glob-to-any-file: - "campaign/**" - "common/**" - "token-bridge/**" @@ -21,12 +22,14 @@ api: # Native CLI tooling (`cargo run -p orbitchain-tools -- …`). cli: - - any-to-match: + - changed-files: + - any-glob-to-any-file: - "crates/tools/**" # Frontend / mobile-wallet surfaces (Playwright + wallet integration). frontend: - - any-to-match: + - changed-files: + - any-glob-to-any-file: - "wallet_connect.html" - "wallet_connect.js" - "tests/e2e/**" @@ -34,7 +37,8 @@ frontend: # CI / build infrastructure. ci: - - any-to-match: + - changed-files: + - any-glob-to-any-file: - ".github/workflows/**" - ".github/*.md" - ".github/ISSUE_TEMPLATE/**" @@ -45,19 +49,22 @@ ci: # Documentation and reference material. documentation: - - any-to-match: + - changed-files: + - any-glob-to-any-file: - "docs/**" - "**/*.md" # Persistent / temporary storage backend code paths. storage: - - any-to-match: + - changed-files: + - any-glob-to-any-file: - "**/storage*.rs" - "**/backend.rs" # Tests / property-based / fuzz harnesses. testing: - - any-to-match: + - changed-files: + - any-glob-to-any-file: - "**/tests/**" - "**/*test*.rs" - "**/proptest-strategies/**" @@ -66,6 +73,7 @@ testing: # Security process and security-sensitive code. security: - - any-to-match: + - changed-files: + - any-glob-to-any-file: - "SECURITY.md" - "**/security*.rs" From 9717ed2893704e0e4d8ba9e06d5e8c60444cfda8 Mon Sep 17 00:00:00 2001 From: jonathanayubausara-a11y Date: Tue, 28 Jul 2026 20:49:42 +0000 Subject: [PATCH 4/4] fix(ci): add checkout step so labeler reads config from PR branch The labeler workflow (pull_request_target) previously had no checkout step, so it always fetched .github/labeler.yml from main via the API. This created a chicken-and-egg problem: PRs that fixed the labeler config couldn't make their own labeler check pass. Adding actions/checkout@v4 with the PR head SHA lets the labeler read the config file locally from the PR branch. The action only consumes a YAML file (no run: steps execute PR code), so the pull_request_target context remains safe. Co-fixes the labeler v5 schema migration included in this branch. --- .github/workflows/labeler.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 7ee5a6ec..b3388728 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -8,8 +8,13 @@ # `pull_request_target` is the official recipe for labeler workflows # because the action needs `pull-requests: write` to apply labels, and # that permission is only available in the base branch's context. -# The action itself is read-only against repository code; it does not -# evaluate `run:` from PRs. +# +# We explicitly check out the PR head so the labeler reads the +# `.github/labeler.yml` from the PR branch rather than fetching the +# base-branch copy via the API. This lets PRs ship their own labeler +# config fixes without a chicken-and-egg problem. The only action +# that consumes the checkout is `actions/labeler` (read-only YAML), +# so the pull_request_target context remains safe. name: Pull Request Labeler @@ -26,6 +31,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Apply labels uses: actions/labeler@v5 with: