From b6c72754374f779db9f3338f6739915cb05573d4 Mon Sep 17 00:00:00 2001 From: Agent Date: Sat, 13 Jun 2026 15:59:05 -0400 Subject: [PATCH] docs: add PR creation workflow to AGENTS.md --- AGENTS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 6d534a1..9b65dce 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -54,6 +54,11 @@ Repo-specific guidance for OpenCode sessions. Verified against code. - `api_token` column on users for Bearer token auth - `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 `), create a new PR from it via API: `POST /api/v1/repos/devlab/server-manager/pulls` with `head=`, `base=master`. +- If the current branch **does not exist on remote**, create a new one from master first: `git checkout -b master`, push it, then create the PR. +- The API token for `git.devlab.lat` is embedded in the remote URL (`agent:@git.devlab.lat`). Use `-u "agent:"` for basic auth. The token is accessible via `git remote get-url origin`. + ## Testing / CI - **No tests, no CI, no linter, no formatter, no typechecker** exist in this repo