From 65235d8ad09e53065ad35df9d0876fa0e3f57ab3 Mon Sep 17 00:00:00 2001 From: Alexander Ivanov Date: Wed, 26 Aug 2026 10:39:44 +0300 Subject: [PATCH 1/2] Add Gitea Actions parity workflows Mirrors the GitHub quality/openspec-validate merge gate and adds a require-changeset check, both validated end-to-end on a self-hosted Gitea instance during a POC. Additive only: .gitea/ and .github/ are ignored by the other host, so this does not affect the existing GitHub CI. Co-Authored-By: Claude Sonnet 5 --- .gitea/workflows/quality.yml | 42 ++++++++++++++ .gitea/workflows/require-changeset.yml | 32 ++++++++++ .../.openspec.yaml | 3 + .../proposal.md | 58 +++++++++++++++++++ .../tasks.md | 20 +++++++ 5 files changed, 155 insertions(+) create mode 100644 .gitea/workflows/quality.yml create mode 100644 .gitea/workflows/require-changeset.yml create mode 100644 openspec/changes/archive/2026-08-26-add-gitea-actions-parity/.openspec.yaml create mode 100644 openspec/changes/archive/2026-08-26-add-gitea-actions-parity/proposal.md create mode 100644 openspec/changes/archive/2026-08-26-add-gitea-actions-parity/tasks.md diff --git a/.gitea/workflows/quality.yml b/.gitea/workflows/quality.yml new file mode 100644 index 0000000..e59023c --- /dev/null +++ b/.gitea/workflows/quality.yml @@ -0,0 +1,42 @@ +name: Quality + +on: + push: + branches: [main] + pull_request: + branches: [main] + +env: + NODE_VERSION: 22.11.0 + NPM_VERSION: 10.9.0 + +jobs: + quality: + name: Typecheck, lint, test, and build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: npm + - run: npm install --global npm@${NPM_VERSION} + - run: npm ci + - run: npm run verify + - run: npm run build + - run: npm audit --omit=dev --audit-level=high + + openspec-validate: + name: OpenSpec change validation (merge gate) + needs: quality + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + cache: npm + - run: npm install --global npm@${NPM_VERSION} + - run: npm install --global @fission-ai/openspec@1.7.0 + - run: npm ci + - run: npm run start --workspace @openspec-ui/cli -- validate --cwd "${{ github.workspace }}" diff --git a/.gitea/workflows/require-changeset.yml b/.gitea/workflows/require-changeset.yml new file mode 100644 index 0000000..c389770 --- /dev/null +++ b/.gitea/workflows/require-changeset.yml @@ -0,0 +1,32 @@ +name: Require changeset + +on: + pull_request: + branches: [main] + +jobs: + require-changeset: + name: Require a changeset when package source changed + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Check for a changeset when package source or manifests changed + run: | + set -e + BASE="origin/${{ github.event.pull_request.base.ref }}" + git fetch origin "${{ github.event.pull_request.base.ref }}" --depth=50 + CHANGED=$(git diff --name-only "$BASE"...HEAD) + echo "Changed files:" + echo "$CHANGED" + if echo "$CHANGED" | grep -qE '^packages/[^/]+/(src/|package\.json$)'; then + if echo "$CHANGED" | grep -qE '^\.changeset/.*\.md$'; then + echo "Package source or manifest changed and a changeset is present. OK." + else + echo "::error::Package source or a package.json changed under packages/*/ but no .changeset/*.md file was added. Run 'npx changeset' and commit the result." + exit 1 + fi + else + echo "No package source or manifest changed; changeset not required." + fi diff --git a/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/.openspec.yaml b/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/.openspec.yaml new file mode 100644 index 0000000..9bb4379 --- /dev/null +++ b/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/.openspec.yaml @@ -0,0 +1,3 @@ +schema: spec-driven +created: 2026-08-26 +skip_specs: true diff --git a/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/proposal.md b/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/proposal.md new file mode 100644 index 0000000..294674b --- /dev/null +++ b/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/proposal.md @@ -0,0 +1,58 @@ +## Why + +Follow-up from the 2026-08-26 discussion ("Предлагаю ... сделать CLI +одинаковым для Github и Gitea") and the agreed Gitea Actions plan. A +proof-of-concept was validated end-to-end on the user's own Gitea +instance (Gitea 1.26.4, self-hosted `ubuntu-latest` runner): a scratch +repository confirmed `actions/checkout@v4` (a GitHub Marketplace action) +runs unmodified, and a "require changeset when package source changed" +check correctly failed without a changeset and passed once one was +added. This change carries that validated approach into the actual +repository as reference/portable CI, so a fork or mirror hosted on +Gitea gets the same `@openspec-ui/cli validate` merge gate and the same +Changesets discipline as the GitHub-hosted original, without touching +`.github/workflows/` at all (Gitea ignores `.github/`, GitHub ignores +`.gitea/` — the two are additive, not conflicting). + +## What Changes + +- Add `.gitea/workflows/quality.yml`: mirrors the `quality` (typecheck, + lint, test, build, `npm audit`) and `openspec-validate` (the + `@openspec-ui/cli validate` merge gate — the concrete "same CLI on + both hosts" requirement) jobs from `.github/workflows/quality.yml`, + using `${{ github.workspace }}` (a context expression, confirmed + working during the POC) instead of the `$GITHUB_WORKSPACE` env var + (not independently verified on Gitea Actions). +- Add `.gitea/workflows/require-changeset.yml`: the POC's + require-a-changeset check, adapted to this repository's real + structure — gates on `packages/*/src/**` or `packages/*/package.json` + changes (not any file under `packages/`, which would over-trigger on + docs-only edits) lacking an accompanying `.changeset/*.md` file. +- Deliberately out of scope (not mirrored): `extension-integration`, + `release-extension` (uses `gh release`, GitHub-token-specific), and + `dependency-review` (`actions/dependency-review-action` is a + GitHub-only API integration, not Marketplace-portable) — these need + host-specific redesign, not a mechanical mirror, and are not part of + the validated POC scope. +- Not adding an equivalent changeset-presence check to + `.github/workflows/`: that would newly gate every existing GitHub PR + on this repository, a policy change distinct from Gitea-portability + and better made as its own explicit decision later if wanted. + +## Capabilities + +### New Capabilities + +(none) + +### Modified Capabilities + +(none in the specified-behavior sense; `.openspec.yaml` sets +`skip_specs: true` — these are additional execution surfaces for the +same already-specified `quality-gates`/`ci-cli` behavior, not new or +changed product behavior) + +## Impact + +- `.gitea/workflows/quality.yml` (new) +- `.gitea/workflows/require-changeset.yml` (new) diff --git a/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/tasks.md b/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/tasks.md new file mode 100644 index 0000000..b96f0ac --- /dev/null +++ b/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/tasks.md @@ -0,0 +1,20 @@ +## 1. Add the Gitea Actions workflows + +- [x] 1.1 Add `.gitea/workflows/quality.yml`, mirroring + `.github/workflows/quality.yml`'s `quality` and `openspec-validate` + jobs (same steps, same pinned `NODE_VERSION`/`NPM_VERSION`), using + `${{ github.workspace }}` instead of `$GITHUB_WORKSPACE`. +- [x] 1.2 Add `.gitea/workflows/require-changeset.yml`, adapted from the + validated POC: gate on `packages/*/src/**` or `packages/*/package.json` + changes lacking an accompanying `.changeset/*.md` file. + +## 2. Verification + +- [x] 2.1 Both workflow files are valid YAML and were exercised in + equivalent form during the Gitea Actions POC on the user's own Gitea + instance (confirmed: `actions/checkout@v4` runs unmodified; the + require-changeset check fails without a changeset and passes with + one) — no product code changed, so no `npm run typecheck`/`lint`/ + `test` impact. +- [x] 2.2 `npm run lint` (including `lint:english`) passes workspace-wide. +- [x] 2.3 Run `openspec change validate --strict add-gitea-actions-parity`. From f3bfae0f9dce3ec927ddb54677e7050bdd9331a4 Mon Sep 17 00:00:00 2001 From: Alexander Ivanov Date: Wed, 26 Aug 2026 10:42:36 +0300 Subject: [PATCH 2/2] Fix English-policy violation in add-gitea-actions-parity proposal.md A verbatim Russian quote slipped through because the local lint:english check was run before the file was staged; check-english.mjs scans only git-tracked files (git ls-files), so an untracked new file is silently skipped. CI's lint:english (run against the committed tree) caught it. Co-Authored-By: Claude Sonnet 5 --- .../2026-08-26-add-gitea-actions-parity/proposal.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/proposal.md b/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/proposal.md index 294674b..65bd393 100644 --- a/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/proposal.md +++ b/openspec/changes/archive/2026-08-26-add-gitea-actions-parity/proposal.md @@ -1,8 +1,9 @@ ## Why -Follow-up from the 2026-08-26 discussion ("Предлагаю ... сделать CLI -одинаковым для Github и Gitea") and the agreed Gitea Actions plan. A -proof-of-concept was validated end-to-end on the user's own Gitea +Follow-up from the 2026-08-26 discussion, which asked for the CLI-based +merge gate to work the same way on both GitHub and Gitea, and the agreed +Gitea Actions plan. A proof-of-concept was validated end-to-end on the +user's own Gitea instance (Gitea 1.26.4, self-hosted `ubuntu-latest` runner): a scratch repository confirmed `actions/checkout@v4` (a GitHub Marketplace action) runs unmodified, and a "require changeset when package source changed"