mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
chore: make changelog mandatory in PR skills
This commit is contained in:
@@ -110,9 +110,9 @@ Before any substantive review or prep work, **always rebase the PR branch onto c
|
||||
- During `prepare-pr`, use this commit subject format: `fix: <summary> (openclaw#<PR>) thanks @<pr-author>`.
|
||||
- Group related changes; avoid bundling unrelated refactors.
|
||||
- Changelog workflow: keep the latest released version at the top (no `Unreleased`); after publishing, bump the version and start a new top section.
|
||||
- When working on a PR: add a changelog entry with the PR number and thank the contributor.
|
||||
- When working on a PR: add a changelog entry with the PR number and thank the contributor (mandatory in this workflow).
|
||||
- When working on an issue: reference the issue in the changelog entry.
|
||||
- Pure test additions/fixes generally do **not** need a changelog entry unless they alter user-facing behavior or the user asks for one.
|
||||
- In this workflow, changelog is always required even for internal/test-only changes.
|
||||
|
||||
## Gate policy
|
||||
|
||||
@@ -233,7 +233,7 @@ Go or no-go checklist before merge:
|
||||
|
||||
- All BLOCKER and IMPORTANT findings are resolved.
|
||||
- Verification is meaningful and regression risk is acceptably low.
|
||||
- Docs and changelog are updated when required.
|
||||
- Changelog is updated (mandatory) and docs are updated when required.
|
||||
- Required CI checks are green and the branch is not behind `main`.
|
||||
|
||||
Expected output:
|
||||
|
||||
@@ -67,7 +67,7 @@ jq -r '.findings[] | select(.severity=="BLOCKER" or .severity=="IMPORTANT") | "-
|
||||
|
||||
Fix all required findings. Keep scope tight.
|
||||
|
||||
3. Update changelog/docs when required
|
||||
3. Update changelog/docs (changelog is mandatory in this workflow)
|
||||
|
||||
```sh
|
||||
jq -r '.changelog' .local/review.json
|
||||
|
||||
@@ -123,7 +123,7 @@ Minimum JSON shape:
|
||||
"result": "pass"
|
||||
},
|
||||
"docs": "up_to_date|missing|not_applicable",
|
||||
"changelog": "required|not_required"
|
||||
"changelog": "required"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ Docs: https://docs.openclaw.ai
|
||||
- Agents: prevent file descriptor leaks in child process cleanup. (#13565) Thanks @KyleChen26.
|
||||
- Agents: prevent double compaction caused by cache TTL bypassing guard. (#13514) Thanks @taw0002.
|
||||
- Agents: use last API call's cache tokens for context display instead of accumulated sum. (#13805) Thanks @akari-musubi.
|
||||
- Agents: keep followup-runner session `totalTokens` aligned with post-compaction context by using last-call usage and shared token-accounting logic. (#14979) Thanks @shtse8.
|
||||
- Discord: allow channel-edit to archive/lock threads and set auto-archive duration. (#5542) Thanks @stumct.
|
||||
- Discord tests: use a partial @buape/carbon mock in slash command coverage. (#13262) Thanks @arosstale.
|
||||
- Tests: update thread ID handling in Slack message collection tests. (#14108) Thanks @swizzmagik.
|
||||
|
||||
21
scripts/pr
21
scripts/pr
@@ -344,7 +344,7 @@ EOF_MD
|
||||
"result": "pass"
|
||||
},
|
||||
"docs": "not_applicable",
|
||||
"changelog": "not_required"
|
||||
"changelog": "required"
|
||||
}
|
||||
EOF_JSON
|
||||
fi
|
||||
@@ -411,23 +411,14 @@ review_validate_artifacts() {
|
||||
local changelog_status
|
||||
changelog_status=$(jq -r '.changelog // ""' .local/review.json)
|
||||
case "$changelog_status" in
|
||||
"required"|"not_required")
|
||||
"required")
|
||||
;;
|
||||
*)
|
||||
echo "Invalid changelog status in .local/review.json: $changelog_status"
|
||||
echo "Invalid changelog status in .local/review.json: $changelog_status (must be \"required\")"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "$changelog_status" = "required" ]; then
|
||||
local changelog_finding_count
|
||||
changelog_finding_count=$(jq '[.findings[]? | select(((.area // "" | ascii_downcase | contains("changelog")) or (.title // "" | ascii_downcase | contains("changelog")) or (.fix // "" | ascii_downcase | contains("changelog"))))] | length' .local/review.json)
|
||||
if [ "$changelog_finding_count" -eq 0 ]; then
|
||||
echo "changelog is required but no changelog-related finding exists in .local/review.json"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "review artifacts validated"
|
||||
}
|
||||
|
||||
@@ -630,6 +621,12 @@ prepare_gates() {
|
||||
docs_only=true
|
||||
fi
|
||||
|
||||
# Enforce workflow policy: every prepared PR must include a changelog update.
|
||||
if ! printf '%s\n' "$changed_files" | rg -q '^CHANGELOG\.md$'; then
|
||||
echo "Missing CHANGELOG.md update in PR diff. This workflow requires a changelog entry."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
run_quiet_logged "pnpm build" ".local/gates-build.log" pnpm build
|
||||
run_quiet_logged "pnpm check" ".local/gates-check.log" pnpm check
|
||||
|
||||
|
||||
Reference in New Issue
Block a user