Merge pull request 'feat: per-project Matrix room from project TOML' (#34) from feat/per-project-matrix into main

Reviewed-on: https://codeberg.org/johba/disinto/pulls/34
This commit is contained in:
johba 2026-03-17 09:59:34 +01:00
commit e2262b5737
3 changed files with 25 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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