From 0f7d70cac886973e0fcd7632ef51faf2d27093f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hartmut=20N=C3=B6renberg?= Date: Thu, 2 Apr 2026 23:07:33 +0200 Subject: [PATCH] docs(learnings): record Gitea API token location and usage patterns Token lives at ~/.gitea-token (chmod 600). Includes curl examples for listing issues, adding comments, and closing tickets via the Gitea REST API. Co-Authored-By: claude-flow --- LEARNINGS.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/LEARNINGS.md b/LEARNINGS.md index 639ec1a..45ce680 100644 --- a/LEARNINGS.md +++ b/LEARNINGS.md @@ -7,6 +7,33 @@ ## Learnings +### 2026-04-02 | DevOps | Gitea API token location + +**Token:** `~/.gitea-token` (chmod 600, never committed to repo) +**API base:** `https://gitea.hartmut-noerenberg.com/api/v1` +**Repo path:** `Hartmut/plANARCHY` + +Usage example (list open issues): +```bash +curl -s -H "Authorization: token $(cat ~/.gitea-token)" \ + "https://gitea.hartmut-noerenberg.com/api/v1/repos/Hartmut/plANARCHY/issues?state=open&type=issues&limit=50" +``` + +Close an issue with a comment: +```bash +TOKEN=$(cat ~/.gitea-token) +REPO="Hartmut/plANARCHY" +BASE="https://gitea.hartmut-noerenberg.com/api/v1" +# Add comment +curl -s -X POST -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \ + "$BASE/repos/$REPO/issues/42/comments" -d '{"body": "Fixed in commit abc1234."}' +# Close issue +curl -s -X PATCH -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \ + "$BASE/repos/$REPO/issues/42" -d '{"state": "closed"}' +``` + +--- + ### 2026-04-02 | DevOps | Prisma schema changes require container restart **Problem:** After adding a new column to `schema.prisma` and running `prisma generate` on the host, the running Docker app container still used the old Prisma client (the container's `node_modules` is a named Docker volume, isolated from the host filesystem). Queries referencing the new field (`isActive`) failed at runtime, causing tRPC procedures to return errors.