Add Gitea integration for agent to push branches and open pull requests
- Implemented `register-gitea-bot.sh` to provision Gitea access token. - Updated `maintainer.py` to support Gitea API for push and PR operations. - Modified `install.sh` to warn if Gitea token is not provisioned. - Enhanced documentation in `README.md`, `CLAUDE.md`, and `architecture.md` to reflect new Gitea functionality. - Added Gitea configuration to `config.example.json`.
This commit is contained in:
@@ -41,6 +41,13 @@ Claude Code, then relays/acts on the agent's JSON result.
|
||||
major/breaking ones to Matrix.
|
||||
- **Matrix**: bot `@maintainer-bot:semprini.me` DMs `@paul:semprini.me`. Escalations
|
||||
are numbered questions; the reply is fed back to the agent to carry out.
|
||||
- **Git/PRs**: when the agent changes tracked files it branches, pushes, and opens
|
||||
a **pull request** on git.semprini.me (Gitea) as the `claude-code` user (never
|
||||
commits to `main`); live remediation still happens immediately and directly.
|
||||
The daemon injects claude-code's git identity + credential and the Gitea API
|
||||
env into the headless agent (see `agent_git_env` / `GIT_PR_POLICY` in
|
||||
`maintainer.py`); token provisioned by `register-gitea-bot.sh`. Empty
|
||||
`gitea.token` disables the workflow.
|
||||
- **Autonomy** (`config.json` → `autonomy`): `full` (default) | `fix-only` |
|
||||
`notify`.
|
||||
|
||||
@@ -60,6 +67,7 @@ Claude Code, then relays/acts on the agent's JSON result.
|
||||
| `maintainer.py` | The daemon (stdlib only). |
|
||||
| `config.example.json` | Template — copy to `config.json`. |
|
||||
| `register-matrix-bot.sh` | Creates `@maintainer-bot` account + DM room; writes token to config. |
|
||||
| `register-gitea-bot.sh` | Mints the `claude-code` Gitea token (push + PRs); writes it to config. |
|
||||
| `install.sh` | Syntax-check, install unit, enable + start. |
|
||||
| `semprini-maintainer.service` | systemd unit (runs as `paul`). |
|
||||
| `docs/architecture.md` | Architecture decision record. |
|
||||
|
||||
Reference in New Issue
Block a user