From 32556761c17b1f231d2d8006f5e1ba5116ce68de Mon Sep 17 00:00:00 2001 From: compat-seeder Date: Sun, 10 May 2026 17:02:48 +0300 Subject: [PATCH] fix(compat): commit as git_admin (only Gitea-known user passes pre-receive hook) --- .gitea/workflows/seed-compat.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/seed-compat.yml b/.gitea/workflows/seed-compat.yml index c35efce..99eafa5 100644 --- a/.gitea/workflows/seed-compat.yml +++ b/.gitea/workflows/seed-compat.yml @@ -146,8 +146,14 @@ jobs: for major in 18.0 19.0; do git worktree remove --force "addons-$major" || true; done rm -rf compat-bootstrap/per-major - git config user.email "compat-seeder@odoosky.cloud" - git config user.name "compat-seeder" + # Author identity must match a real Gitea user — the + # branch-protection pre-receive hook calls GetUserByID against + # the committer email and rejects with "Internal Server Error" + # (uid=-2) when no match exists. compat-seeder doesn't have a + # Gitea account; the COMPAT_PUSH_TOKEN is git_admin's anyway, + # so commit + push under that identity for a clean audit trail. + git config user.email "m@havari.me" + git config user.name "git_admin" if [ ! -f compat-bootstrap/seeded-ci.json ]; then echo "ERROR: seeded-ci.json was not produced; aborting" @@ -166,7 +172,7 @@ jobs: stamp=$(python3 -c "import json,sys; print(json.load(open('compat-bootstrap/seeded-ci.json'))['stampId'])") git commit -m "chore(compat): refresh cold-start seed (${stamp})" - # Push via token. COMPAT_PUSH_TOKEN is a repo-scoped PAT with - # write access to odoo-tower/odoo-addons:compat-bootstrap. - remote="https://compat-seeder:${GIT_USER_TOKEN}@git.odoosky.org/odoo-tower/odoo-addons.git" + # Push via token. COMPAT_PUSH_TOKEN belongs to git_admin and + # is whitelisted on the compat-bootstrap branch protection. + remote="https://git_admin:${GIT_USER_TOKEN}@git.odoosky.org/odoo-tower/odoo-addons.git" git push "$remote" HEAD:compat-bootstrap