Target self-hosted Gitea: Gitea-API issue script + CI runner note

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Robin Kutesa
2026-06-18 18:17:01 +03:00
parent 27d0e22767
commit e6ab2242f0
2 changed files with 47 additions and 41 deletions

View File

@@ -1,46 +1,48 @@
#!/usr/bin/env bash
# Populate the GitHub issue tracker from docs/BACKLOG.md.
# Run AFTER the repo exists and `gh` is authenticated: bash scripts/create-issues.sh
# Create issues on self-hosted Gitea from docs/BACKLOG.md.
# You supply the token (this script never stores it). Generate one in Gitea:
# Settings → Applications → Generate New Token (scope: write:issue, read/write repo)
#
# Run:
# GITEA_URL=http://10.10.1.21:3002 GITEA_OWNER=kutesir GITEA_REPO=jarvis \
# GITEA_TOKEN=xxxxxxxx bash scripts/create-issues.sh
set -euo pipefail
: "${GITEA_URL:?set GITEA_URL e.g. http://10.10.1.21:3002}"
: "${GITEA_OWNER:?set GITEA_OWNER e.g. kutesir}"
: "${GITEA_REPO:?set GITEA_REPO e.g. jarvis}"
: "${GITEA_TOKEN:?set GITEA_TOKEN (Gitea → Settings → Applications → Generate Token)}"
API="$GITEA_URL/api/v1/repos/$GITEA_OWNER/$GITEA_REPO/issues"
gh label create client --color 1D76DB --description "iOS app" 2>/dev/null || true
gh label create backend --color 0E8A16 --description "Backend coordination" 2>/dev/null || true
gh label create ci --color 5319E7 --description "CI / build" 2>/dev/null || true
gh label create connectivity --color FBCA04 --description "Networking / VPN" 2>/dev/null || true
mk() {
local body
body=$(python3 -c 'import json,sys; print(json.dumps({"title":sys.argv[1],"body":sys.argv[2]}))' "$1" "$2")
curl -sf -X POST "$API" \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d "$body" >/dev/null && echo " + $1"
}
issue() { gh issue create --title "$1" --label "$2" --body "$3"; }
mk "Add Sport (F1) and World topic pills" \
"The 47 feeds include heavy F1 + global-news coverage squeezed into finance/tech/politics/africa. Add pills in Topic.filters; backend classifier must emit sport/world slugs to match. [client][backend]"
mk "Wire the Tailscale remote host in Connectivity" \
"Populate the Remote Access card's host so away-from-home auto-selects the Tailscale address. Verify the LAN<->Tailscale switch via /health probing. [client]"
mk "SSID-based trusted networks" \
"Pin trusted Wi-Fi by name. Needs the Access WiFi Information entitlement (real device + paid account); no-ops in the simulator. Currently approximated by LAN reachability. [client]"
mk "Optional in-app WireGuard tunnel" \
"NetworkExtension packet-tunnel so Jarvis can bring up a WireGuard tunnel itself (WireGuard/Netmaker configs only). Needs entitlement + real device. Deferred. [client]"
mk "App icon + launch assets" \
"AppIcon is an empty placeholder. [client]"
mk "Flesh out Latest / Saved / Search tabs" \
"Currently minimal reuse of the feed components; add proper empty/loading states and dedicated behavior. [client]"
mk "Verify hero image loading in the reader" \
"AsyncImage against real feed imageUrls (ATS, redirects, grey fallback) in the article reader. [client]"
mk "Validate infinite scroll / pagination at scale" \
"Validate loadMore/cursor round-trips against the live ~850-story dataset; guard against dupes. [client]"
mk "Topic-classifier coverage for the 47 feeds" \
"Ensure science/tech/world/sport map sensibly into the supported topic slugs. [backend]"
mk "Add unit/UI tests + test matrix leg" \
"The build matrix compiles but runs no tests yet; add a test target and a test matrix leg. [ci]"
mk "Offline-first polish" \
"Green cached dot + Saved tab depend on opening an article; consider pre-caching top stories. [client]"
issue "Add Sport (F1) and World topic pills" "enhancement,client,backend" \
"The 47 feeds include heavy F1 + global-news coverage squeezed into finance/tech/politics/africa. Add pills in \`Topic.filters\`; backend classifier must emit \`sport\` / \`world\` slugs to match."
issue "Wire the Tailscale remote host in Connectivity" "enhancement,client,connectivity" \
"Populate the Remote Access card's host so away-from-home auto-selects the Tailscale address. Verify the LAN⇄Tailscale switch via /health probing."
issue "SSID-based trusted networks" "enhancement,client,connectivity" \
"Pin trusted Wi-Fi by name (\"Add current network\"). Needs the Access WiFi Information entitlement (real device + paid account); no-ops in the simulator. Currently approximated by LAN reachability."
issue "Optional in-app WireGuard tunnel" "enhancement,client,connectivity" \
"NetworkExtension packet-tunnel so Jarvis can bring up a WireGuard tunnel itself (WireGuard/Netmaker configs only). Needs entitlement + real device. Deferred."
issue "App icon + launch assets" "enhancement,client" \
"AppIcon is an empty placeholder."
issue "Flesh out Latest / Saved / Search tabs" "enhancement,client" \
"Currently minimal reuse of the feed components; add proper empty/loading states and dedicated behavior."
issue "Verify hero image loading in the reader" "client" \
"AsyncImage against real feed imageUrls (ATS, redirects, grey fallback) in the article reader."
issue "Validate infinite scroll / pagination at scale" "client" \
"Validate loadMore/cursor round-trips against the live ~850-story dataset; guard against dupes."
issue "Topic-classifier coverage for the 47 feeds" "backend" \
"Ensure science/tech/world/sport map sensibly into the supported topic slugs."
issue "Add unit/UI tests + test matrix leg" "ci" \
"The build matrix compiles but runs no tests yet; add a test target and a test matrix leg."
issue "Offline-first polish" "enhancement,client" \
"Green cached dot + Saved tab depend on opening an article; consider pre-caching top stories for true offline-first."
echo "Done. Created issues from docs/BACKLOG.md."
echo "Done."