diff --git a/svn_mirror/gitea.py b/svn_mirror/gitea.py index cf13f25..5853197 100644 --- a/svn_mirror/gitea.py +++ b/svn_mirror/gitea.py @@ -136,11 +136,13 @@ def _trigger_gitea_post_receive(changed: list, gitea_cfg): try: config_path = os.environ.get("GITEA_CONFIG", "/etc/gitea/app.ini") lines = "\n".join(f"{o} {n} {r}" for o, n, r in changed) + hook_env = {**os.environ, "GITEA_PUSH_VERIFIED": "1"} r = subprocess.run( [hook_bin, "hook", "--config", config_path, "post-receive"], input=lines.encode(), capture_output=True, timeout=60, + env=hook_env, ) if r.returncode != 0: err = (r.stderr or b"").decode(errors="replace").strip()