Commit graph

33 commits

Author SHA1 Message Date
Cheney
0b1c366f8d
refactor(cli): improve publish-cli script reliability (#441)
* refactor(cli): improve publish-cli script reliability

- Move version computation and pre-flight checks before build-and-test
  to fail fast on conflicts (existing branch/tag) instead of wasting
  minutes on lint/test/build
- Add INT/TERM signal handlers to cleanup trap so Ctrl+C during build
  properly restores working tree state
- Update Makefile help text to reflect PR-based workflow

* fix(cli): use git checkout -f for robust cleanup

Address code review feedback from gemini-code-assist bot:

- Use `git checkout -f` in on-release and committed cleanup stages
  to ensure reliable branch switching even when files are staged
  but not committed (e.g., interrupted after `git add` but before
  `git commit`)
- Remove redundant `git checkout -- <file>` in on-release stage
  since `-f` already discards all local changes

This prevents cleanup failures when the script is interrupted
between staging and committing.

* fix(cli): address PR #441 review findings

- Fix ERR trap bypass: remove `if !` wrapper around `gh pr create` so
  set -e triggers the trap and prints pushed-stage recovery instructions
- Fix command injection: all node -e/-p calls now use process.env
  instead of interpolating shell variables into JS string literals
- Rewrite cli/RELEASE.md to document the new PR-based release flow
- Rewrite scripts/tests/publish-cli-test.sh with 10 tests covering
  the new flow (stubs for bun/gh, pre-flight checks, happy path,
  cleanup state machine stages)

* fix(cli): address PR #441 review findings from @dongmucat

- Bind release tag to origin/main: PR body, end-of-run hint, and
  cli/RELEASE.md now use `git tag $TAG origin/main` so the tag is
  always placed on the merged commit, regardless of local branch state
- Reject prerelease tags in version computation: if the latest cli-v*
  tag contains non-X.Y.Z characters (e.g., -rc.1), exit with a clear
  message instead of crashing in node parsing
- Add pr-scripts.yml workflow: runs publish-cli-test.sh on scripts/**
  changes so the release script regression suite gates PRs
- Add Test 11 covering prerelease tag rejection

* fix(cli): compute publish baseline from origin tags only

A failed `git push origin cli-vX.Y.Z` after a successful local tag
leaves an orphan tag locally. The previous `git tag --list` baseline
would then treat it as the latest release, causing skipped versions or
publishes based on an unreleased tag.

Switch to `git ls-remote --tags --refs origin 'cli-v*' | sort -V` so
the baseline reflects only what is actually on origin. Local orphan
tags can still collide with the computed target tag, which fails fast
with a clear message as before.

Adds test 12 covering the orphan-tag scenario.
2026-06-02 14:30:39 +08:00
dongmucat
55b38051ce
chore(deps): bump vite/postcss/picomatch/flatted/esbuild to patch Dependabot alerts
Some checks failed
Deploy Docs / build (push) Has been cancelled
Deploy Docs / Deploy (push) Has been cancelled
* chore(deps): bump vite/postcss/picomatch/flatted/esbuild to patch Dependabot alerts

web/:
- pnpm.overrides force vite>=6.4.2, postcss>=8.5.10, picomatch>=2.3.2/>=4.0.4, flatted>=3.4.2
- bump devDeps vite to ^6.4.2 and postcss to ^8.5.10

docs/skillhub/:
- npm overrides force vite^6.4.2, postcss^8.5.10, esbuild^0.25.0
- regenerate package-lock.json

Resolves Dependabot alerts:
- web: GHSA-p9ff-h696-f583 (vite high), GHSA-rf6f-7fwh-wjgh (flatted high),
       GHSA-qx2v-qp2m-jg93 (postcss), GHSA-4w7w-66w2-5vf9 (vite),
       GHSA-3v7f-55p6-f55p (picomatch x2)
- docs: GHSA-67mh-4wv8-2f99 (esbuild), GHSA-qx2v-qp2m-jg93 (postcss),
        GHSA-4w7w-66w2-5vf9 (vite)

* chore(deps): bump brace-expansion and add docs-build PR check

web/:
- pnpm.overrides force brace-expansion>=1.1.13 and >=2.0.3
  to address GHSA-f886-m6hf-6m8v (transitive via eslint/typescript-eslint -> minimatch)
- pnpm-lock.yaml resolves brace-expansion 1.1.15 / 2.1.1

ci:
- add docs-build job to pr-tests.yml, gated by docs/skillhub/** path filter
  so docs-only PRs and dependency overrides on docs are exercised before merge
2026-05-28 10:17:27 +08:00
Cheney
f59a10e36f chore(ci): remove temporary publish-script test workflow 2026-05-13 09:28:28 +08:00
Cheney
1420ffac56 test(ci): add temporary workflow to test publish-cli script
This workflow runs scripts/tests/publish-cli-test.sh in CI to verify
the publish script changes. Will be removed after verification.
2026-05-12 17:53:12 +08:00
Cheney
eeb2540a3e fix(cli): align checkout ref across all workflow jobs
publish-npm and create-release now checkout the same ref as
build-and-test (the input tag or push ref), preventing source
mismatch between npm package and GitHub Release artifacts.
2026-05-12 17:29:58 +08:00
Cheney
70b962a4c8 fix(cli): harden release pipeline per PR #422 review
1. npm version check: three-state logic (exists/missing/error) to prevent
   silent skip on network failures, registry 5xx, or auth issues.

2. workflow_dispatch: checkout the specified tag and validate SHA matches,
   preventing builds from wrong ref.

3. Atomic push: use `git push --atomic` and detect unpushed tags via
   `git ls-remote` instead of `--no-merged` (catches branch-pushed-but-
   tag-failed state).
2026-05-12 17:15:35 +08:00
Cheney
159886b76d fix(cli): ensure create-release depends on publish-npm and rewrite publish-cli tests
1. Update release-cli.yml to make create-release depend on publish-npm with proper skip_npm handling, preventing half-released state where GitHub Release exists but npm package is unavailable.

2. Rewrite publish-cli-test.sh to cover the new publish flow: main branch check, dirty tree detection, tag baseline sync, version bumping, tag conflict detection, user cancellation, and atomic push verification.
2026-05-12 16:12:57 +08:00
Cheney
378216c6da feat(cli): add automated build and publish workflow
- Add release-cli.yml GitHub Actions workflow: build, test, npm publish,
  and GitHub Release triggered by cli-v* tags
- Rewrite scripts/publish-cli.sh: local bump + commit + tag + push,
  enforces main branch, idempotent tag checks
- Add concurrency group and release idempotency to workflow
- Add make publish-cli / publish-cli-minor / publish-cli-major targets
- Add cli/RELEASE.md documenting the full release process
2026-05-12 10:32:06 +08:00
dongmucat
351dddc912 feat(cli): add SkillHub CLI v1 with full command suite
Implement complete CLI tool for SkillHub with 12 commands, 7 backend API endpoints, and comprehensive documentation.

CLI Commands:
- help, version: Basic information
- login, logout, whoami: Authentication management
- search: Discover published skills
- install: Install skills to agent directories (14 Tier 1 agents supported)
- list, remove, doctor: Local skill management
- publish: Publish skill packages
- update: Self-update mechanism

Backend API:
- Add /api/cli/v1 endpoints for auth, search, resolve, download, delete, publish
- Implement CliAuthController and CliSkillController
- Add security policies for CLI routes
- Full test coverage (19 backend tests)

CLI Implementation:
- TypeScript with strict mode, Bun runtime
- Pure JS zip handling (fflate) for cross-platform compatibility
- 15 agent profiles (14 Tier 1 + generic fallback)
- Secure token storage (0600 permissions)
- Path safety validation for remove operations
- Comprehensive error handling (404/403/network distinction)
- 41 unit and integration tests

Documentation:
- CLI user guide (Chinese and English)
- README updates with quick start
- GitHub Actions workflow for cross-platform CI

Quality:
- lint: 0 errors
- typecheck: pass
- test: 41/41 pass
- build: 0.30 MB (target=node for npm/npx compatibility)
2026-04-29 15:37:04 +08:00
XiaoSeS
5bf8750658
feat(ci): add AI-powered release notes generation (#322)
* feat(ci): add AI-powered release notes generation

- Add GitHub Models integration for automated release notes
- Support bilingual (EN) release notes with highlights extraction
- Fallback to conventional commit grouping when LLM unavailable
- Trigger on tag push or manual workflow dispatch
- Zero configuration: uses GitHub Models (gpt-4o-mini) by default

* chore: pin action versions and update gitignore

- Pin checkout and setup-deno to commit hashes matching project convention
- Add .playwright-mcp/ and .mcp.json to gitignore
2026-04-17 15:19:48 +08:00
wowo
689e698b89
feat(ci): add PR batch test deployment workflow (#275)
* feat(ci): add PR batch test deployment workflow

* fix(ci): support local PR batch rehearsal

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-04-09 18:45:14 +08:00
wowo
8f694ddc7c
[codex] add issue triage automation mvp (#268)
* add issue triage automation mvp

* Document issue automation design in Chinese

* Fix legacy compat slug tests
2026-04-09 15:04:33 +08:00
South Drifter
66acc6e57b
chore: add GitHub-reward form, scripts & actions (#221)
* chore: add GitHub-reward form, scripts & actions

* fix: Deno system permissions in GitHub actions

* fix: 3 detail bugs
2026-04-07 19:02:59 +08:00
XiaoSeS
1233354087
docs: add VitePress bilingual documentation site (#208)
* docs: add VitePress bilingual documentation site

- Add VitePress-based documentation with Chinese (root) and English (/en/) locales
- Include 6 feature guides: skill-publish, skill-discovery, namespace, review, scanner, social
- Add quickstart, introduction, and FAQ pages
- Include AI-generated diagrams and screenshots
- Add GitHub Pages deployment workflow
- Add Makefile targets: docs-dev, docs-build, docs-preview

* docs: rename docs/claude to docs/skillhub

- Rename documentation directory from docs/claude to docs/skillhub
- Update Makefile paths for docs-dev, docs-build, docs-preview
- Update GitHub workflow paths for deploy-docs.yml
2026-04-02 13:43:55 +08:00
dongmucat
50a6c4b7fe test(e2e,ci): migrate web e2e to real API and add PR e2e workflow (#198)
* chore(workflow): align local hooks and e2e guidance

* test(e2e): expand reusable api mock helpers

* test(skill): stabilize share button e2e assertions

* chore(test): add e2e make target and tune playwright workers

* test(web): expand e2e coverage and smoke suite

* test(e2e): migrate to real API flows and add request-based data builder

* ci(e2e): add PR workflow for real-service frontend e2e

* ci(e2e): install playwright chromium in PR workflow

* test(e2e): relax timeout and force single worker in CI

* test(e2e): stabilize not-found assertions and harden CI session bootstrap

* chore(agents): align tester role with web/e2e workflow
2026-04-01 14:41:23 +08:00
XiaoSeS
c23d0bbc4a feat: add scanner service to v0.2.0 release deployment (#189)
* feat(deploy): add scanner service to release deployment

- Add skill-scanner service to compose.release.yml (enabled by default)
- Add scanner image to CI publish-images workflow matrix
- Add --scanner-image and --no-scanner flags to runtime.sh
- Add scanner config to .env.release.example

* fix(docker): add skillhub-notification module to server Dockerfile

* fix(deploy): set scanner mode to upload for container deployment

* fix(deploy): use env override instead of persisting scanner disabled state
2026-03-30 19:01:51 +08:00
XiaoSeS
28e9049562 feat(profile): add field policy config and GET response
* feat(profile): add field policy config and GET response

Add per-field edit policy configuration (editable, requiresReview) to
application.yml and expose it in the GET /api/v1/user/profile response
via a new fieldPolicies map, enabling the frontend to dynamically render
fields based on backend-driven policies.

* feat(profile): implement mixed submission in PATCH

Split profile update changes by per-field policy: fields without
requiresReview apply immediately, fields with requiresReview enter
the pending queue. Return PARTIALLY_APPLIED status with appliedFields
and pendingFields maps when both paths trigger in a single request.

* feat(web): rewrite profile page with dynamic fields

Render profile fields dynamically from backend fieldPolicies, with
whole-page read/edit mode toggle. Handle APPLIED, PENDING_REVIEW, and
PARTIALLY_APPLIED responses. Add i18n keys for review hints and
partial-apply toasts in both en and zh.

* merge: resolve deepwiki.yml conflict with package-lock.json fix

* api schema

* fix(profile): align moderation defaults and tests

* ci(deepwiki): run crawler on release publish
2026-03-20 14:59:21 +08:00
xiose
d64a7f7ed9 ci(deepwiki): add DeepWiki documentation crawler workflow 2026-03-19 20:45:41 +08:00
vsxd
033ac54c76 chore: unify build and test entrypoints 2026-03-17 14:09:22 +08:00
vsxd
7ced9d38f0 Add PR test workflow 2026-03-17 11:16:01 +08:00
binfan5
f5c029fbe8 feat(ops): add optional runtime registry mirroring 2026-03-15 14:30:04 +08:00
wowo-zZ
b886bd8aed chore(ci): trigger image publish only on release events
- Change workflow trigger from push events to release published events
- Remove automatic builds on main branch merges
- Keep manual workflow_dispatch option for flexibility
2026-03-14 16:08:35 +08:00
vsxd
5485e70eb8 chore: remove validate-openapi workflow 2026-03-13 14:12:59 +08:00
vsxd
45e96be179 fix(ci): install pnpm before setup-node cache 2026-03-13 11:48:44 +08:00
vsxd
f7df348a5a Add OpenAPI drift validation and docs updates 2026-03-13 11:06:55 +08:00
vsxd
2b7968c71c docs(repo): add contribution and community templates 2026-03-13 10:34:12 +08:00
vsxd
f7798dddc5 Revert "merge: bring review fixes into feature/project-init"
This reverts commit 92f63f8b89, reversing
changes made to 78e16f0fe7.
2026-03-13 10:06:14 +08:00
vsxd
9146476fb9 chore(ci): restore release publish triggers 2026-03-12 21:51:25 +08:00
vsxd
3c9b95fd98 refactor(auth): remove local auth flow 2026-03-12 21:36:49 +08:00
vsxd
6864604377 feat(ops): publish multi-arch runtime images 2026-03-12 21:20:14 +08:00
vsxd
f61da15727 chore(ci): restore publish workflow triggers 2026-03-12 20:59:44 +08:00
vsxd
a7481dca5a chore(ci): enable publish workflow on feature branch for validation 2026-03-12 20:55:51 +08:00
vsxd
47c9a1d1db feat(ops): publish runtime images via github actions 2026-03-12 20:53:24 +08:00