feat(M13): auto-PR via gh CLI after successful push (auto_pr=true)

New src/git/pr.ts helper wraps 'gh pr create'; returns { url } or { error }.
maybeCreateAutoPr() in update-job-status checks product.auto_pr, builds title
from story.code + task.title, writes pr_url to DB. Non-fatal: gh failure logs
a warning and leaves DONE status intact. Also syncs schema: auto_pr on Product,
pr_url on ClaudeJob.
This commit is contained in:
Janpeter Visser 2026-05-01 13:30:38 +02:00
parent dadcbc48d6
commit 1015264558
5 changed files with 252 additions and 0 deletions

View file

@ -127,6 +127,7 @@ model Product {
description String?
repo_url String?
definition_of_done String
auto_pr Boolean @default(false)
archived Boolean @default(false)
created_at DateTime @default(now())
updated_at DateTime @updatedAt
@ -267,6 +268,7 @@ model ClaudeJob {
pushed_at DateTime?
plan_snapshot String?
branch String?
pr_url String?
summary String?
error String?
verify_result VerifyResult?