Home

madison / open-git

public
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

feat(cli,api): create pull requests with a Git token

3 months ago

56d8dcf
Authored
V.C. Billingsley6/11/2026, 3:44:05 AM
- lib/pull-requests/create-pull-request: shared, headless PR creation with the
  same access checks (repo.pull.create on target, repo.git.write on source),
  duplicate guard, branch-head resolution, and diff/mergeability/workflow
  enqueues as the web form. Throws CreatePullRequestError with an HTTP status.
- POST /api/pulls: token-authenticated (Bearer or HTTP Basic Git access token,
  requires repo:write scope) JSON endpoint returning the new PR number + url.
- opengit pr create: derives owner/repo from the origin remote and current
  branch, posts to /api/pulls; supports --target/--source/--title/--body/
  --token (or OPENGIT_TOKEN) and --api-url.

Parent6728dd3

3 files changed
  • apps/cli/src/index.ts+142−0
  • apps/web/app/api/pulls/route.ts+124−0
  • apps/web/lib/pull-requests/create-pull-request.ts+200−0