ia_dev/gitea-issues/tickets-fetch-inbox.sh

15 lines
625 B
Bash
Executable File

#!/usr/bin/env bash
# Fetch inbox messages filtered by tickets.authorized_emails (conf.json). No UNSEEN; no mark read.
# Writes new messages to projects/<id>/data/issues/ (ia_dev) as JSON (<date>_<from>_<uid>.pending).
# Usage: cd <racine_projet> && ./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" "$@"