Add gitea-pr script and PR review workflow #1

Merged
branderson merged 9 commits from worktree-gitea-pr-review-workflow into master 2026-07-12 18:49:37 -07:00
Owner

Adds bin/gitea-pr (create/comments/merge against the Gitea REST API) and documents the review workflow in ~/.claude/CLAUDE.md. See ~/specs/2026-07-12-gitea-pr-review-design.md and ~/specs/2026-07-12-gitea-pr-review-plan.md for the full design/plan. All 5 tasks implemented and reviewed via subagent-driven-development; live-tested end to end against device-factory (PR #3: create, comments, merge all verified against the real server).

Adds bin/gitea-pr (create/comments/merge against the Gitea REST API) and documents the review workflow in ~/.claude/CLAUDE.md. See ~/specs/2026-07-12-gitea-pr-review-design.md and ~/specs/2026-07-12-gitea-pr-review-plan.md for the full design/plan. All 5 tasks implemented and reviewed via subagent-driven-development; live-tested end to end against device-factory (PR #3: create, comments, merge all verified against the real server).
branderson added 7 commits 2026-07-12 18:06:24 -07:00
branderson reviewed 2026-07-12 18:24:24 -07:00
bin/gitea-pr Outdated
@@ -0,0 +2,4 @@
set -euo pipefail
GITEA_SSH_HOST="gitbox.bradina.localdomain"
GITEA_API="https://gitbox.branderson.io/api/v1"
Author
Owner

The SSH host and api should be specified outside of this script, in the environment. I'll set these in my .profile.local, just document them if this is run without these set.

The SSH host and api should be specified outside of this script, in the environment. I'll set these in my .profile.local, just document them if this is run without these set.
branderson marked this conversation as resolved
branderson added 1 commit 2026-07-12 18:35:11 -07:00
Addresses PR #1 feedback: host config should live in the environment
(~/.profile.local), not be hardcoded in the script, with a clear error
if unset. Also fixes gitea-pr comments to surface inline diff comments
from reviews, not just issue comments and top-level review bodies --
the review that requested this change would have been invisible to
gitea-pr comments without this fix.
branderson reviewed 2026-07-12 18:40:25 -07:00
bin/gitea-pr Outdated
@@ -0,0 +27,4 @@
if [ -z "${GITEA_TOKEN:-}" ]; then
echo "GITEA_TOKEN is not set. Generate a token in the Gitea web UI" \
"(Settings > Applications, scopes write:repository + write:issue)" \
"and add 'export GITEA_TOKEN=...' to ~/.profile.local" >&2
Author
Owner

We should move the GITEA token to a dedicated file so that it's not available globally in the environment, only sourced where needed.

We should move the GITEA token to a dedicated file so that it's not available globally in the environment, only sourced where needed.
branderson marked this conversation as resolved
branderson added 1 commit 2026-07-12 18:46:21 -07:00
Addresses PR #1 feedback: GITEA_TOKEN shouldn't be exported globally
(visible to every process in the shell), only to gitea-pr itself.
Defaults to ~/.config/gitea/token (chmod 600); GITEA_TOKEN env var
still works as an override for one-off invocations.
branderson merged commit eec71b5f82 into master 2026-07-12 18:49:37 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: branderson/dotfiles#1