






















@@ -200,7 +200,7 @@ validate_changelog_entry_for_pr() {
200200 pr_pattern="(#$pr|openclaw#$pr)"
201201202202local with_pr
203- with_pr=$(printf '%s\n' "$added_lines" | rg -in "$pr_pattern" || true)
203+ with_pr=$(printf '%s\n' "$added_lines" | grep -Ein "$pr_pattern" || true)
204204if [ -z "$with_pr" ]; then
205205echo "CHANGELOG.md update must reference PR #$pr (for example, (#$pr))."
206206exit 1
@@ -338,7 +338,7 @@ END {
338338339339if changelog_thanks_required_for_contributor "$contrib"; then
340340local with_pr_and_thanks
341- with_pr_and_thanks=$(printf '%s\n' "$added_lines" | rg -in "$pr_pattern" | rg -i "thanks @$contrib" || true)
341+ with_pr_and_thanks=$(printf '%s\n' "$added_lines" | grep -Ein "$pr_pattern" | grep -Fi "thanks @$contrib" || true)
342342if [ -z "$with_pr_and_thanks" ]; then
343343echo "CHANGELOG.md update must include both PR #$pr and thanks @$contrib on the changelog entry line."
344344exit 1
@@ -353,7 +353,7 @@ END {
353353fi
354354355355local with_pr_and_any_thanks
356- with_pr_and_any_thanks=$(printf '%s\n' "$added_lines" | rg -in "$pr_pattern" | rg -i '\bthanks[[:space:]]+@' || true)
356+ with_pr_and_any_thanks=$(printf '%s\n' "$added_lines" | grep -Ein "$pr_pattern" | grep -Ei '(^|[[:space:]])thanks[[:space:]]+@' || true)
357357if [ -z "$with_pr_and_any_thanks" ]; then
358358echo "CHANGELOG.md update for bot/app/non-creditable author $contrib must include an explicit human Thanks @handle on the PR #$pr entry line."
359359echo "Choose the credited original contributor, or stop for maintainer input if authorship is unclear."
@@ -377,7 +377,7 @@ validate_changelog_merge_hygiene() {
377377fi
378378379379local removed_refs
380- removed_refs=$(printf '%s\n' "$removed_lines" | rg -o '#[0-9]+' | sort -u || true)
380+ removed_refs=$(printf '%s\n' "$removed_lines" | grep -Eo '#[0-9]+' | sort -u || true)
381381if [ -z "$removed_refs" ]; then
382382return 0
383383fi
@@ -391,7 +391,7 @@ validate_changelog_merge_hygiene() {
391391local ref
392392while IFS= read -r ref; do
393393 [ -z "$ref" ] && continue
394-if ! printf '%s\n' "$added_lines" | rg -q -F "$ref"; then
394+if ! printf '%s\n' "$added_lines" | grep -Fq "$ref"; then
395395echo "CHANGELOG.md drops existing entry reference $ref without re-adding it."
396396echo "Likely merge conflict loss; restore the dropped entry (or keep the same PR ref in rewritten text)."
397397exit 1
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。