mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 18:04:59 +00:00
docs(skills): allow docs-only prep to skip pnpm test (#12718)
This commit is contained in:
@@ -104,6 +104,8 @@ Stop if any are true:
|
|||||||
- Required checks are failing.
|
- Required checks are failing.
|
||||||
- Branch is behind main.
|
- Branch is behind main.
|
||||||
|
|
||||||
|
If `.local/prep.md` contains `Docs-only change detected with high confidence; skipping pnpm test.`, that local test skip is allowed. CI checks still must be green.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Checks
|
# Checks
|
||||||
gh pr checks <PR>
|
gh pr checks <PR>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Prepare a PR branch for merge with review fixes, green gates, and an updated hea
|
|||||||
|
|
||||||
- Rebase PR commits onto `origin/main`.
|
- Rebase PR commits onto `origin/main`.
|
||||||
- Fix all BLOCKER and IMPORTANT items from `.local/review.md`.
|
- Fix all BLOCKER and IMPORTANT items from `.local/review.md`.
|
||||||
- Run gates and pass.
|
- Run required gates and pass (docs-only PRs may skip `pnpm test` when high-confidence docs-only criteria are met and documented).
|
||||||
- Commit prep changes.
|
- Commit prep changes.
|
||||||
- Push the updated HEAD back to the PR head branch.
|
- Push the updated HEAD back to the PR head branch.
|
||||||
- Write `.local/prep.md` with a prep summary.
|
- Write `.local/prep.md` with a prep summary.
|
||||||
@@ -163,17 +163,46 @@ If `committer` is not found:
|
|||||||
git commit -m "fix: <summary> (#<PR>) (thanks @$contrib)"
|
git commit -m "fix: <summary> (#<PR>) (thanks @$contrib)"
|
||||||
```
|
```
|
||||||
|
|
||||||
8. Run full gates before pushing
|
8. Decide verification mode and run required gates before pushing
|
||||||
|
|
||||||
|
If you are highly confident the change is docs-only, you may skip `pnpm test`.
|
||||||
|
|
||||||
|
High-confidence docs-only criteria (all must be true):
|
||||||
|
|
||||||
|
- Every changed file is documentation-only (`docs/**`, `README*.md`, `CHANGELOG.md`, `*.md`, `*.mdx`, `mintlify.json`, `docs.json`).
|
||||||
|
- No code, runtime, test, dependency, or build config files changed (`src/**`, `extensions/**`, `apps/**`, `package.json`, lockfiles, TS/JS config, test files, scripts).
|
||||||
|
- `.local/review.md` does not call for non-doc behavior fixes.
|
||||||
|
|
||||||
|
Suggested check:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
changed_files=$(git diff --name-only origin/main...HEAD)
|
||||||
|
non_docs=$(printf "%s\n" "$changed_files" | grep -Ev '^(docs/|README.*\.md$|CHANGELOG\.md$|.*\.md$|.*\.mdx$|mintlify\.json$|docs\.json$)' || true)
|
||||||
|
|
||||||
|
docs_only=false
|
||||||
|
if [ -n "$changed_files" ] && [ -z "$non_docs" ]; then
|
||||||
|
docs_only=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "docs_only=$docs_only"
|
||||||
|
```
|
||||||
|
|
||||||
|
Run required gates:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
pnpm install
|
pnpm install
|
||||||
pnpm build
|
pnpm build
|
||||||
pnpm ui:build
|
pnpm ui:build
|
||||||
pnpm check
|
pnpm check
|
||||||
|
|
||||||
|
if [ "$docs_only" = "true" ]; then
|
||||||
|
echo "Docs-only change detected with high confidence; skipping pnpm test." | tee -a .local/prep.md
|
||||||
|
else
|
||||||
pnpm test
|
pnpm test
|
||||||
|
fi
|
||||||
```
|
```
|
||||||
|
|
||||||
Require all to pass. If something fails, fix, commit, and rerun. Allow at most 3 fix and rerun cycles. If gates still fail after 3 attempts, stop and report the failures. Do not loop indefinitely.
|
Require all required gates to pass. If something fails, fix, commit, and rerun. Allow at most 3 fix and rerun cycles. If gates still fail after 3 attempts, stop and report the failures. Do not loop indefinitely.
|
||||||
|
|
||||||
9. Push updates back to the PR head branch
|
9. Push updates back to the PR head branch
|
||||||
|
|
||||||
@@ -245,4 +274,4 @@ Otherwise, list remaining failures and stop.
|
|||||||
- Do not delete the worktree on success. `/mergepr` may reuse it.
|
- Do not delete the worktree on success. `/mergepr` may reuse it.
|
||||||
- Do not run `gh pr merge`.
|
- Do not run `gh pr merge`.
|
||||||
- Never push to main. Only push to the PR head branch.
|
- Never push to main. Only push to the PR head branch.
|
||||||
- Run and pass all gates before pushing.
|
- Run and pass all required gates before pushing. `pnpm test` may be skipped only for high-confidence docs-only changes, and the skip must be explicitly recorded in `.local/prep.md`.
|
||||||
|
|||||||
Reference in New Issue
Block a user