From 4f06b2364f077f8ed5d09a9c4ae967858544c7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Mon, 24 Aug 2026 18:24:38 -0400 Subject: [PATCH] Sync workflow: always open PR, report trial-merge status Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp --- .gitea/workflows/upstream-sync.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/upstream-sync.yml b/.gitea/workflows/upstream-sync.yml index db4d8c09..38363bb6 100644 --- a/.gitea/workflows/upstream-sync.yml +++ b/.gitea/workflows/upstream-sync.yml @@ -36,11 +36,15 @@ jobs: echo "Sync branch $BR already exists, PR pending review" exit 0 fi - git checkout -b "$BR" - # Merge conflicts fail the job loudly; resolution is manual by design - git merge --no-edit "upstream/quattro" - git push origin "$BR" + # Trial merge only to report conflict status in the PR body + MERGE="clean" + if ! git merge --no-commit --no-ff "upstream/quattro" > /dev/null 2>&1; then + MERGE="CONFLICTS (resolve manually)" + fi + git merge --abort 2> /dev/null || true + # Branch points at upstream HEAD so the PR always gets created + git push origin "$UP:refs/heads/$BR" curl -sS --fail-with-body -X POST \ -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \ "$API/repos/$REPO/pulls" \ - -d "{\"base\":\"quattro\",\"head\":\"$BR\",\"title\":\"Sync upstream omarchy ${UP:0:8}\",\"body\":\"Automated sync of basecamp/omarchy quattro @ $UP. Review changes, run ./test/all, then merge.\"}" + -d "{\"base\":\"quattro\",\"head\":\"$BR\",\"title\":\"Sync upstream omarchy ${UP:0:8}\",\"body\":\"Automated sync of basecamp/omarchy quattro @ $UP. Trial merge: $MERGE. Review, run ./test/all, then merge.\"}"