From ed57eff7042a71f2f474474106b698dea0b7e035 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 17 Mar 2026 08:52:41 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20per-project=20Matrix=20room=20=E2=80=94?= =?UTF-8?q?=20load=20MATRIX=5FROOM=5FID=20from=20project=20TOML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each project can specify its own Matrix room for notifications. - harb → #harb-dev:matrix.allf.in - disinto → #disinto-dev:matrix.allf.in --- lib/load-project.sh | 15 +++++++++++++++ projects/disinto.toml | 5 +++++ projects/harb.toml | 5 +++++ 3 files changed, 25 insertions(+) diff --git a/lib/load-project.sh b/lib/load-project.sh index acfe20c..770059f 100755 --- a/lib/load-project.sh +++ b/lib/load-project.sh @@ -54,6 +54,15 @@ svc = cfg.get('services', {}) if 'containers' in svc: emit('PROJECT_CONTAINERS', svc['containers']) +# [matrix] section +mx = cfg.get('matrix', {}) +if 'room_id' in mx: + emit('MATRIX_ROOM_ID', mx['room_id']) +if 'bot_user' in mx: + emit('MATRIX_BOT_USER', mx['bot_user']) +if 'token_env' in mx: + emit('MATRIX_TOKEN_ENV', mx['token_env']) + # [monitoring] section mon = cfg.get('monitoring', {}) for key in ['check_prs', 'check_dev_agent', 'check_pipeline_stall']: @@ -80,4 +89,10 @@ if [ -z "${PROJECT_REPO_ROOT:-}" ] && [ -n "${PROJECT_NAME:-}" ]; then export PROJECT_REPO_ROOT="/home/${USER}/${PROJECT_NAME}" fi +# Resolve MATRIX_TOKEN from env var name (token_env points to an env var, not the token itself) +if [ -n "${MATRIX_TOKEN_ENV:-}" ]; then + export MATRIX_TOKEN="${!MATRIX_TOKEN_ENV:-}" + unset MATRIX_TOKEN_ENV +fi + unset _PROJECT_TOML _PROJECT_VARS _key _val diff --git a/projects/disinto.toml b/projects/disinto.toml index a740340..70ceb3d 100644 --- a/projects/disinto.toml +++ b/projects/disinto.toml @@ -16,6 +16,11 @@ stale_minutes = 60 [services] containers = [] +[matrix] +room_id = "!ynKSMyWU7OSkbNjR:matrix.allf.in" +bot_user = "@disinto-factory:matrix.allf.in" +token_env = "DISINTO_MATRIX_TOKEN" + [monitoring] check_prs = true check_dev_agent = true diff --git a/projects/harb.toml b/projects/harb.toml index e976392..8fed836 100644 --- a/projects/harb.toml +++ b/projects/harb.toml @@ -14,6 +14,11 @@ stale_minutes = 60 [services] containers = ["ponder"] +[matrix] +room_id = "!LvLgiDVUbZKcRYga:matrix.allf.in" +bot_user = "@harb-factory:matrix.allf.in" +token_env = "MATRIX_TOKEN" + [monitoring] check_prs = true check_dev_agent = true