#!/usr/bin/env bash # Fetch inbox messages filtered by tickets.authorized_emails (conf.json). No UNSEEN; no mark read. # Writes new messages to projects//data/issues/ (ia_dev) as JSON (__.pending). # Usage: cd && ./ia_dev/gitea-issues/tickets-fetch-inbox.sh set -euo pipefail GITEA_ISSUES_DIR="${GITEA_ISSUES_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" PROJECT_ROOT="$(cd "${GITEA_ISSUES_DIR}/../.." && pwd)" export GITEA_ISSUES_DIR export PROJECT_ROOT export REPO_ROOT="${GITEA_ISSUES_DIR}/.." cd "$PROJECT_ROOT" exec python3 "${GITEA_ISSUES_DIR}/tickets-fetch-inbox.py" "$@"