Add --force flag to reverse sync

Bypasses the PR step and force-pushes the subrepo's state directly onto
the monorepo branch. Also skips the skip-dirty guard. Only valid with
--reverse. Returns status "forced".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 01:43:47 +03:00
parent 1cb23a4411
commit 5e9b134168
6 changed files with 74 additions and 20 deletions

View File

@@ -28,6 +28,16 @@ subrepo_auth_url() {
fi
}
# ─── Monorepo Auth URL ─────────────────────────────────────────────
# Derives a push-capable HTTPS URL from MONOREPO_API.
# MONOREPO_API shape: https://<host>/api/v1/repos/<org/repo>
mono_auth_url() {
local api_host_path
api_host_path=$(echo "$MONOREPO_API" | sed 's|https://||; s|/api/v1/repos/|/|')
echo "https://${BOT_USER}:${GITEA_TOKEN}@${api_host_path}.git"
}
# ─── Remote Queries ─────────────────────────────────────────────────
subrepo_ls_remote() {