docs: add PR creation workflow to AGENTS.md

This commit is contained in:
2026-06-13 15:59:05 -04:00
parent 0a3ae63621
commit b6c7275437

View File

@@ -54,6 +54,11 @@ Repo-specific guidance for OpenCode sessions. Verified against code.
- `api_token` column on users for Bearer token auth - `api_token` column on users for Bearer token auth
- `server_permissions` table stores required SSH permissions per server (FK to `servers.id` CASCADE) - `server_permissions` table stores required SSH permissions per server (FK to `servers.id` CASCADE)
## PR creation workflow
- If the current branch **exists on remote** (`git ls-remote --heads origin <branch>`), create a new PR from it via API: `POST /api/v1/repos/devlab/server-manager/pulls` with `head=<branch>`, `base=master`.
- If the current branch **does not exist on remote**, create a new one from master first: `git checkout -b <name> master`, push it, then create the PR.
- The API token for `git.devlab.lat` is embedded in the remote URL (`agent:<token>@git.devlab.lat`). Use `-u "agent:<token>"` for basic auth. The token is accessible via `git remote get-url origin`.
## Testing / CI ## Testing / CI
- **No tests, no CI, no linter, no formatter, no typechecker** exist in this repo - **No tests, no CI, no linter, no formatter, no typechecker** exist in this repo