惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 聂微东
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
博客园 - 司徒正美
人人都是产品经理
人人都是产品经理
Jina AI
Jina AI
博客园 - 叶小钗
雷峰网
雷峰网
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - Franky
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
量子位

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(maint): use rebase PR landing · openclaw/openclaw@c04...
vincentkoc · 2026-06-23 · via Recent Commits to openclaw:main

@@ -187,59 +187,14 @@ merge_run() {

187187

source .local/prep.env

188188189189

local pr_meta_json

190-

pr_meta_json=$(gh pr view "$pr" --json number,title,state,isDraft,author)

191-

local pr_title

192-

pr_title=$(printf '%s\n' "$pr_meta_json" | jq -r .title)

193-

local pr_number

194-

pr_number=$(printf '%s\n' "$pr_meta_json" | jq -r .number)

195-

local contrib

196-

contrib=$(printf '%s\n' "$pr_meta_json" | jq -r .author.login)

190+

pr_meta_json=$(gh pr view "$pr" --json state,isDraft)

197191

local is_draft

198192

is_draft=$(printf '%s\n' "$pr_meta_json" | jq -r .isDraft)

199193

if [ "$is_draft" = "true" ]; then

200194

echo "PR is draft; stop."

201195

exit 1

202196

fi

203197204-

local reviewer

205-

reviewer=$(gh api user --jq .login)

206-

local reviewer_id

207-

reviewer_id=$(gh api user --jq .id)

208-209-

local contrib_coauthor_email="${COAUTHOR_EMAIL:-}"

210-

if [ -z "$contrib_coauthor_email" ] || [ "$contrib_coauthor_email" = "null" ]; then

211-

if contrib_coauthor_email=$(resolve_contributor_coauthor_email "$contrib"); then

212-

:

213-

else

214-

contrib_coauthor_email=""

215-

fi

216-

fi

217-218-

local reviewer_email_candidates=()

219-

local reviewer_email_candidate

220-

while IFS= read -r reviewer_email_candidate; do

221-

[ -n "$reviewer_email_candidate" ] || continue

222-

reviewer_email_candidates+=("$reviewer_email_candidate")

223-

done < <(merge_author_email_candidates "$reviewer" "$reviewer_id")

224-

if [ "${#reviewer_email_candidates[@]}" -eq 0 ]; then

225-

echo "Unable to resolve a candidate merge author email for reviewer $reviewer"

226-

exit 1

227-

fi

228-229-

local reviewer_email="${reviewer_email_candidates[0]}"

230-

local reviewer_coauthor_email="${reviewer_id}+${reviewer}@users.noreply.github.com"

231-232-

{

233-

echo "Merged via squash."

234-

echo

235-

echo "Prepared head SHA: $PREP_HEAD_SHA"

236-

if [ -n "$contrib_coauthor_email" ]; then

237-

echo "Co-authored-by: $contrib <$contrib_coauthor_email>"

238-

fi

239-

echo "Co-authored-by: $reviewer <$reviewer_coauthor_email>"

240-

echo "Reviewed-by: @$reviewer"

241-

} > .local/merge-body.txt

242-243198

delete_remote_pr_head_branch_after_merge() {

244199

local head_json

245200

head_json=$(gh pr view "$pr" --json headRefName,headRepository,headRepositoryOwner,isCrossRepository,maintainerCanModify)

@@ -269,48 +224,19 @@ merge_run() {

269224

return 0

270225

}

271226272-

run_merge_with_email() {

273-

local email="$1"

274-

local merge_output_file

275-

merge_output_file=$(mktemp)

276-

if gh pr merge "$pr" \

277-

--squash \

278-

--match-head-commit "$PREP_HEAD_SHA" \

279-

--author-email "$email" \

280-

--subject "$pr_title (#$pr_number)" \

281-

--body-file .local/merge-body.txt \

282-

>"$merge_output_file" 2>&1

283-

then

284-

rm -f "$merge_output_file"

285-

return 0

286-

fi

287-288-

MERGE_ERR_MSG=$(cat "$merge_output_file")

289-

print_relevant_log_excerpt "$merge_output_file"

290-

rm -f "$merge_output_file"

291-

return 1

292-

}

293-294-

local MERGE_ERR_MSG=""

295-

local selected_merge_author_email="$reviewer_email"

296-

if ! run_merge_with_email "$selected_merge_author_email"; then

297-

if is_author_email_merge_error "$MERGE_ERR_MSG" && [ "${#reviewer_email_candidates[@]}" -ge 2 ]; then

298-

selected_merge_author_email="${reviewer_email_candidates[1]}"

299-

echo "Retrying merge once with fallback author email: $selected_merge_author_email"

300-

run_merge_with_email "$selected_merge_author_email" || {

301-

echo "Merge failed after fallback retry."

302-

exit 1

303-

}

304-

else

305-

echo "Merge failed."

306-

exit 1

307-

fi

227+

if ! gh pr merge "$pr" \

228+

--rebase \

229+

--match-head-commit "$PREP_HEAD_SHA" \

230+

>.local/merge-output.log 2>&1

231+

then

232+

print_relevant_log_excerpt .local/merge-output.log

233+

exit 1

308234

fi

309235310236

local state

311237

state=$(gh pr view "$pr" --json state --jq .state)

312238

if [ "$state" != "MERGED" ]; then

313-

echo "Merge not finalized yet (state=$state), waiting up to 15 minutes..."

239+

echo "Landing not finalized yet (state=$state), waiting up to 15 minutes..."

314240

local i

315241

for i in $(seq 1 90); do

316242

sleep 10

@@ -326,20 +252,20 @@ merge_run() {

326252

exit 1

327253

fi

328254329-

local merge_sha

330-

merge_sha=$(gh pr view "$pr" --json mergeCommit --jq '.mergeCommit.oid')

331-

if [ -z "$merge_sha" ] || [ "$merge_sha" = "null" ]; then

332-

echo "Merge commit SHA missing."

255+

local landed_sha

256+

landed_sha=$(gh pr view "$pr" --json mergeCommit --jq '.mergeCommit.oid')

257+

if [ -z "$landed_sha" ] || [ "$landed_sha" = "null" ]; then

258+

echo "Landed commit SHA missing."

333259

exit 1

334260

fi

335261

local repo_nwo

336262

repo_nwo=$(gh repo view --json nameWithOwner --jq .nameWithOwner)

337263338-

local merge_sha_url=""

339-

if gh api repos/:owner/:repo/commits/"$merge_sha" >/dev/null 2>&1; then

340-

merge_sha_url="https://github.com/$repo_nwo/commit/$merge_sha"

264+

local landed_sha_url=""

265+

if gh api repos/:owner/:repo/commits/"$landed_sha" >/dev/null 2>&1; then

266+

landed_sha_url="https://github.com/$repo_nwo/commit/$landed_sha"

341267

else

342-

echo "Merge commit is not resolvable via repository commit endpoint: $merge_sha"

268+

echo "Landed commit is not resolvable via repository commit endpoint: $landed_sha"

343269

exit 1

344270

fi

345271

@@ -358,29 +284,16 @@ merge_run() {

358284

exit 1

359285

fi

360286361-

local commit_body

362-

commit_body=$(gh api repos/:owner/:repo/commits/"$merge_sha" --jq .commit.message)

363-

if [ -n "$contrib_coauthor_email" ]; then

364-

printf '%s\n' "$commit_body" | rg -q "^Co-authored-by: $contrib <" || { echo "Missing PR author co-author trailer"; exit 1; }

365-

else

366-

echo "Skipping PR author co-author trailer check for bot/app author $contrib."

367-

fi

368-

printf '%s\n' "$commit_body" | rg -q "^Co-authored-by: $reviewer <" || { echo "Missing reviewer co-author trailer"; exit 1; }

369-370287

local ok=0

371288

local comment_output=""

372289

local attempt

373290

for attempt in 1 2 3; do

374291

if comment_output=$(

375292

{

376-

echo "Merged via squash."

293+

echo "Merged via rebase."

377294

echo

378295

echo "- Prepared head SHA: [$PREP_HEAD_SHA]($prep_sha_url)"

379-

echo "- Merge commit: [$merge_sha]($merge_sha_url)"

380-

if pr_contributor_allows_human_trailers "$contrib"; then

381-

echo

382-

echo "Thanks @$contrib!"

383-

fi

296+

echo "- Landed commit: [$landed_sha]($landed_sha_url)"

384297

} | gh pr comment "$pr" -F - 2>&1

385298

); then

386299

ok=1

@@ -409,8 +322,7 @@ merge_run() {

409322

pr_url=$(gh pr view "$pr" --json url --jq .url)

410323411324

echo "merge-run complete for PR #$pr"

412-

echo "merge commit: $merge_sha"

413-

echo "merge author email: $selected_merge_author_email"

325+

echo "landed commit: $landed_sha"

414326

echo "completion comment: $comment_url"

415327

echo "$pr_url"

416328

}