#544 Ship the GitHub receiver and och-import-github in every server package (#538)
–
- github
- github/openchronology/timeline-app
- github/openchronology/timeline-app#544
- pull request
- state:merged
Ships the GitHub receiver and `och-import-github` (#538) in every server package, mirroring the syslog receiver and `och-import-logs`. This is stacked on #543, and I'll retarget it as the stack merges. ## In every package - **The service:** `openchronology-github` (`OpenChronologyGitHub` on Windows, `openchronology_github` on FreeBSD). Like syslog's: - it is installed stopped and disabled until configured; - it runs as `openchronology-logs` (Local Service on Windows); - it listens on 127.0.0.1:5580; - `openchronology-migrate` restarts it only when it is enabled. - **The command:** `och-import-github`, and an example `github.env`. - **Its state folder:** the receiver writes `GITHUB_STATE` to remember each item's board column, so each package gives it a folder of its own: | Platform | State folder | | --- | --- | | systemd and NixOS | `StateDirectory=openchronology-github` | | FreeBSD | `/var/db/openchronology-github` | | Homebrew | `$(brew --prefix)/var/openchronology` | | Windows | `C:\ProgramData\OpenChronology\github-state` | | Compose | a `github-state` volume | ## By format - **Debian:** unit, env and wrapper, plus postinst, prerm and migrate. - **RPM:** spec and Dockerfile. - **Arch:** PKGBUILD, install script and `scripts/aur-packages.mjs`. - **Homebrew:** formula, agent, setup and migrate. - **FreeBSD:** rc script, `build.sh` and the pre/post-install scripts. - **Windows:** service XML, `.cmd` wrapper, `build.ps1`, setup, remove and the installer. - **Nix:** `nix/server.nix` wrappers, and `services.openchronology.github` in `nix/module.nix`, which warns when `environmentFile` is unset. - **Docker:** - `Dockerfile.app` adds the symlink and a state folder. - Compose adds a `github` service under the `github` profile, on host loopback only. - `.env.example` lists its variables. - CI checks `och-import-github --help` in the image. - **Docs:** `docs/github.md` gains "Running it as a service". The install, administration and Nix docs list the GitHub receiver wherever syslog appears. ## Tests - **Package tests:** `server-deb`, `server-rpm`, `server-arch`, `server-freebsd`, `server-homebrew` and `server-windows` now check: - that the command answers `--help`; - that the service is installed and stopped; - where syslog's tests check startup, that the receiver loads and refuses to start without its secret. The new unit also joins the `systemd-analyze verify` list. - **What ran:** none of these package builds could run locally, since they need Docker images and VMs, so this PR's CI is their first real run. - **Local checks:** - `npm test` passes; - `node --check` passes on every changed JS file, and `sh -n` / `bash -n` on every changed script; - shellcheck and nixfmt were not available. ## Differences from syslog - **Compose variable names:** the receiver's OpenChronology settings are `GITHUB_RECEIVER_API_URL` and `GITHUB_RECEIVER_API_KEY`. `GITHUB_API_URL` already names GitHub Enterprise's API, and `GITHUB_API_KEY` would read like a GitHub credential. - **No end-to-end delivery test:** syslog's package tests send a real message into a timeline. These check installation and startup only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/pull/544
Related
- #538 Work-item sources: aggregate GitHub assignments, then Planner and kanban boards
- #543 Mirror releases, milestones and time in board columns from GitHub (#538)
- #546 Mirror Forgejo and Gitea, and commits, branches and forks (#538)
- Merge pull request #544 from openchronology/feature/github-packaging