Repository navigation
ci: the gallery check on every PR, and a README note on how content arrives - #1
Merged
Merged
Conversation
…DME note on how content arrives Refs objectstack-ai/objectstack#31122 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUtaGRLf12LBQ2uTjA
…t-gallery --check Refs objectstack-ai/objectstack#31122 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUtaGRLf12LBQ2uTjA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Refs objectstack-ai/objectstack#31122
维护者速读
Gallery check,每个 PR 都跑export-gallery --check;README 加一段「内容怎么进来」的说明。.env/node_modules/本机路径、框架版本是不是已发布的稳定版)。contents: read,不推送、不评论、不执行 PR 里的文件;回滚即 revert 本 PR。.github/workflows/gallery-check.yml(钉住的 objectstack 提交与三步安装、构建、检查)。Gallery check检查,预期绿色,日志末行gallery check: clean。main上开分支保护,把Gallery check设为必需检查(设置清单见 objectstack#31122 的报告评论)。What changes
.github/workflows/gallery-check.yml(new), onpull_request, withpermissions: contents: readonly. Job nameGallery check, the context branch protection should require. It checks out this PR, and checks out objectstack-ai/objectstack at the pinned full SHAc2bb879fe71c16bd1d0b42708109efb7f6543d5d: the main commit that mergedexport-gallery --check(feat(scenarios): export-gallery --check, the mechanical check a gallery PR must pass objectstack#31748). Then it runspnpm install --frozen-lockfile --filter '@objectstack/scenarios...'andOS_SKIP_DTS=1 pnpm --filter '@objectstack/scenarios^...' build. Last,pnpm --filter @objectstack/scenarios export-gallery --check "$GITHUB_WORKSPACE/gallery"fails the job with one line per finding.@objectstack/scenariosis not on npm yet, so the checker runs from source at the pin. Once a release carries it, the checkout, install and build steps become onenpx --yes @objectstack/scenarios@VERSION export-gallery --check ., pinned to that exact version.README.md: a "How content arrives" section, plus one sentence in the Chinese half. The content is generated, a PR from the scheduled export task is the normal path, every PR must pass the gallery check, and hand edits belong inapps/README.mdonly.No content under
apps/orindex.jsonis touched.What the check fails on
index.jsonthat does not match the exporter's schema (an absent one is an empty gallery); an entry without a completeapps/ID/(README, run record, scorecard and transcript in JSON and Markdown,source/objectstack.config.ts, at least one screenshot, every listed screenshot on disk and none unlisted); a directory underapps/that no entry lists; aframework.versionthat is not a stable@objectstack/clirelease published on npm (npm view @objectstack/cli versions); and, anywhere in the tree, a.env*name, anode_modulesdirectory, a symbolic link, or a text file naming a local absolute path.Acceptance notes
main(PR only,Gallery checkrequired) is a repository setting for the maintainer. This PR does not and cannot set it.AGENTS.mdlists the hand-written files, and the list does not name.github/workflows/gallery-check.yml. That file is outside this PR's surface (one workflow and the README note), so it is left alone. Adding the workflow to that list is a one-line follow-up.Verification
The workflow's steps, run against this branch's tree
c2bb879fe71c16bd1d0b42708109efb7f6543d5d. The filtered install exited 0.OS_SKIP_DTS=1 pnpm --filter '@objectstack/scenarios^...' buildexited 0 in 35 s under the verify lock, on a shared box.pnpm --filter @objectstack/scenarios export-gallery --checkon this branch's tree (headb0145986: README, AGENTS.md, CLAUDE.md, LICENSE, .gitignore, apps/README.md, the workflow):gallery check: clean, exit 0..envfile and an unlistedapps/stray/gave exit 1 and two lines,app-unlisted apps/strayandenv-file .env.yaml.safe_load).Generated by Claude Code