backend that creates OJP issues and assigns them to the relevant project | Read-only mirror of https://github.com/openTdataCH/ojp-issue-intake — SBB. Issues & pull requests at the source.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Vasile Cotovanu 8527bb93ad stay in sync
2026-06-07 22:22:36 +02:00
src Updates docs 2026-06-07 22:18:58 +02:00
.gitignore Allow env 2026-06-07 18:06:05 +02:00
LICENSE Initial commit 2026-06-07 17:53:29 +02:00
README.md Updates README 2026-06-07 22:18:21 +02:00
requirements.txt stay in sync 2026-06-07 22:22:36 +02:00

OJP Issue Intake

This is a small FastAPI service that acts as a front door to the OpenTdataCH OJP GitHub ecosystem: it collects issue reports through a web form/API and automatically creates, enriches, and places GitHub issues into the correct project board.

Install

$ python3 -m venv .venv && source .venv/bin/activate
$ pip install --upgrade pip
$ pip install -r requirements.txt

Configure

Edit .env or create and edit .env.user (.git ignored)

ENV var ex value comments
GITHUB_OWNER openTdataCH Github user/org under which the issues are created
GITHUB_REPO ojp-sdk Github repo under which the issues are created
GITHUB_REPO_TOKEN github_pat_11AAA32SQ0fv7VoqGc ... Github PAT with write access for repo/user above
GIST_TOKEN ghp_R8R2aGD ... gist.github.com token where the XML gists are created

Run Server

# in ./src
$ uvicorn server:app --host 0.0.0.0 --port 8000

Example

POST /ojp_sdk_issue

Payload JSON
{
  "title": "string",
  "description": "string",
  "requestXML": "string",
  "responseXML": "string",
  "projectKey": "string"
}

where

field type required description
title string yes title of the Github issue that will be created
description string yes description of the Github issue that will be created
requestXML string yes OJP XML request
responseXML string yes OJP XML response
projectKey string yes project key, see MAP_PROJECT_IDS in ./src/server.py for the actual mapping id to Github projects