oh-my-pr 2.13.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,10 +1,7 @@
1
- # Oh-my-PR
2
- **This project is going to save you tons of time by automating the whole PR process.**
3
-
4
- **Local-first GitHub PR babysitter for Codex and Claude**
1
+ # oh-my-pr
5
2
 
6
3
  <p align="center">
7
- <img width="409" height="409" alt="Code Factory logo" src="https://github.com/user-attachments/assets/ca339a71-40d9-4619-900f-55825f30a57f" />
4
+ <img width="409" height="409" alt="oh-my-pr logo" src="https://github.com/user-attachments/assets/ca339a71-40d9-4619-900f-55825f30a57f" />
8
5
  </p>
9
6
 
10
7
  [![npm version](https://img.shields.io/npm/v/oh-my-pr.svg)](https://www.npmjs.com/package/oh-my-pr)
@@ -13,80 +10,120 @@
13
10
  [![Node.js 22+](https://img.shields.io/badge/Node.js-22%2B-green.svg)](https://nodejs.org/)
14
11
  [![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue.svg)](https://www.typescriptlang.org/)
15
12
 
16
- Oh-my-pr babysits your PRs from your local machine, reads all PR comments and CI/CD logs, resolves conflicts, and gets your PR ready for merge to main. It uses your local Claude Code or Codex to address any issues identified in the PR or CI/CD pipeline and to ensure that any documentation is up to date. You can push a PR, walk away, and come back to a clean PR ready to be merged.
17
-
18
- <img width="1365" height="686" alt="Code Factory dashboard" src="https://github.com/user-attachments/assets/66dfa082-c732-4989-8b05-f19aa550acb5" />
19
-
20
- ## Features
13
+ oh-my-pr is a local-first GitHub PR babysitter. It watches the pull requests you care about, reads review feedback and CI failures, then uses your local Codex or Claude CLI to make fixes in isolated worktrees and push them back to the PR branch.
21
14
 
22
- - Watch multiple repositories with a per-repo auto-discovery scope (`My PRs only` by default, or `My PRs + teammates`) or add a single PR by URL.
23
- - Auto-register matching open PRs from watched repos, archive closed or merged PRs, and keep syncing review activity.
24
- - Pause background automation for an individual tracked PR while keeping manual runs available.
25
- - Store PR state, background jobs, questions, release runs, logs, and social changelogs in SQLite with mirrored log files.
26
- - Queue repo sync, babysit/apply runs, PR questions, release processing, deployment healing, and social changelog generation in a durable SQLite-backed dispatcher that survives restarts.
27
- - Triage feedback into `accept`, `reject`, or `flag`, with manual overrides and retry for failed or warned items.
28
- - Run `codex` or `claude` in isolated worktrees under `~/.oh-my-pr`, then push verified fixes back to the PR branch.
29
- - Evaluate review comments and failing CI statuses, post GitHub follow-ups, resolve review threads, and heal CI failures through persisted CI healing sessions per PR head.
30
- - Monitor merged Vercel or Railway deployments, capture deployment logs on failure, and open follow-up `deploy-fix/*` PRs when deployment healing is enabled.
31
- - Detect merge conflicts and optionally let the agent resolve them automatically.
32
- - Ask natural-language questions about any tracked PR from the dashboard or via MCP.
33
- - Configure trusted reviewers, ignored bots, polling, batching, run limits, and CI-healing retry budgets from settings.
34
- - Enable drain mode to stop claiming new queued work and optionally wait for active queue handlers to finish before deploys or upgrades.
35
- - Check onboarding status, install Claude or Codex review workflows, and generate social changelogs every 5 PRs merged to `main`.
36
- - Use the React dashboard, local REST API, MCP server, or optional Tauri desktop shell.
15
+ If you regularly lose time to review comments, flaky checks, merge conflicts, and back-and-forth cleanup before merge, this is the tool for that.
37
16
 
38
- ## How It Works
17
+ <img width="1365" height="686" alt="oh-my-pr dashboard" src="https://github.com/user-attachments/assets/66dfa082-c732-4989-8b05-f19aa550acb5" />
39
18
 
40
- 1. Add a repository to the watch list or register a PR directly by URL. Watched repos default to `My PRs only`, and you can switch a repo to `My PRs + teammates` when you want team-wide discovery.
41
- 2. The watcher enqueues a durable repo-sync job in SQLite.
42
- 3. That sync job polls GitHub, auto-registers matching open PRs for each watched repo based on its watch scope, syncs reviews and comments, archives PRs that closed upstream, records failing CI on the current head SHA, and queues babysitter runs for tracked PRs whose background watch is enabled.
43
- 4. Manual apply/babysit requests, PR questions, release processing, and social changelog generation go through the same durable queue before work executes in an app-owned repo cache and isolated git worktree under `~/.oh-my-pr`.
44
- 5. The agent applies fixes, verifies the result, pushes to the PR branch, updates GitHub threads, and writes logs for the full run.
19
+ ## Why It Exists
45
20
 
46
- Repo sync, babysit/apply, PR Q&A, release processing, deployment healing, and social changelog generation all run through durable background jobs stored in `state.sqlite`. On startup the dispatcher reclaims expired job leases, and interrupted babysitter runs are resumed from stored run context when possible.
21
+ Pull requests often stall for boring reasons:
47
22
 
48
- PRs you register directly by URL stay tracked regardless of the watched repo's auto-discovery scope.
23
+ - review comments arrive after you have switched context
24
+ - CI fails after you think the work is done
25
+ - fixes require reopening local context and rebuilding the same mental model
26
+ - merge prep becomes repetitive babysitting instead of real development
49
27
 
50
- ## CI Healing
28
+ oh-my-pr keeps that loop moving from your machine. You push a branch, let it watch the PR, and come back to something much closer to merge-ready.
51
29
 
52
- When `Automatic CI healing` is enabled, Code Factory creates a healing session for each failing PR head SHA, classifies failures as safe to fix in-branch or blocked external, and runs bounded repair attempts in isolated worktrees. The dashboard surfaces the current session state and retry budget, and the local API exposes `GET /api/healing-sessions` plus `GET /api/healing-sessions/:id` for operator visibility.
53
-
54
- ## Deployment Healing
30
+ ## Quick Start
55
31
 
56
- When deployment healing is enabled through `PATCH /api/config`, Code Factory inspects merged PRs for supported deployment markers, waits for the post-merge deployment to appear, and polls the matching platform CLI for success or failure. On failure, it captures deployment logs, runs the configured agent from the merge commit in the app-owned repo cache, pushes a `deploy-fix/<platform>-<timestamp>` branch, and opens a follow-up PR against the merged base branch.
32
+ You need:
57
33
 
58
- Deployment healing currently supports Vercel and Railway repositories detected from common repo-local config files. It requires the matching CLI in `PATH` and authenticated on the same machine running Code Factory. Session history is exposed through `GET /api/deployment-healing-sessions`, `GET /api/deployment-healing-sessions/:id`, and the matching MCP read tools.
34
+ - Node.js 22+
35
+ - `git`
36
+ - GitHub auth via `gh auth login` or `GITHUB_TOKEN`
37
+ - either the `codex` CLI or `claude` CLI installed and authenticated locally
59
38
 
60
- ## Quick Start
39
+ Install and launch:
61
40
 
62
41
  ```bash
63
42
  npm install -g oh-my-pr
64
43
  oh-my-pr
65
44
  ```
66
45
 
67
- That's it. The terminal UI launches in your shell. Run `oh-my-pr web` to start the web dashboard instead.
46
+ That opens the terminal UI. If you prefer the browser dashboard, run:
47
+
48
+ ```bash
49
+ oh-my-pr web
50
+ ```
51
+
52
+ Then:
53
+
54
+ 1. Add a GitHub repository you want to watch.
55
+ 2. Choose whether to auto-discover only your PRs or your team's PRs too.
56
+ 3. Add a PR directly by URL if you want to track just one pull request.
57
+ 4. Let oh-my-pr sync comments, checks, and follow-up work.
58
+
59
+ ## What It Does
60
+
61
+ - Watches repositories and tracked PRs for review activity, comments, and failing checks
62
+ - Triages feedback into actionable items
63
+ - Runs `codex` or `claude` in isolated worktrees under `~/.oh-my-pr`
64
+ - Replies to GitHub PR comments on your behalf and resolves conversations to keep the thread clean
65
+ - Pushes verified fixes back to the PR branch
66
+ - Can automatically create a GitHub release when a merged PR is important enough to justify a version bump
67
+ - Keeps logs, run history, and PR state on your machine
68
+ - Exposes the same system through a dashboard, local API, and MCP server
69
+
70
+ ## Technical Details
71
+
72
+ ### Local-First
73
+
74
+ oh-my-pr runs on your machine and works with your local agent CLI. Repository caches (`repos/`), worktrees (`worktrees/`), logs (`log/`), and app state (`state.sqlite`) live under `~/.oh-my-pr` by default. Set `OH_MY_PR_HOME` if you want a different location.
75
+
76
+ ### Isolation
77
+
78
+ Each fix run happens in an app-owned repository cache and an isolated git worktree. That keeps agent changes scoped to the PR branch instead of mutating your day-to-day checkout.
79
+
80
+ ### GitHub Auth
81
+
82
+ You can authenticate with:
68
83
 
69
- ### Prerequisites
84
+ - `gh auth login`
85
+ - `GITHUB_TOKEN`
86
+ - app config in the dashboard
87
+ - a saved dashboard token
70
88
 
71
- - **Node.js 22+** (tested with Node v24.12.0)
72
- - **git**
73
- - GitHub auth via `gh auth login`, `GITHUB_TOKEN`, app config, or a saved dashboard token
74
- - Either the `codex` CLI or `claude` CLI installed and authenticated locally
75
- - Optional for deployment healing: the `vercel` CLI and/or `railway` CLI installed and authenticated for repositories you want to auto-heal after merge
89
+ ### Watch Scope
76
90
 
77
- ### CLI Usage
91
+ Watched repositories default to `My PRs only`. You can switch a repo to `My PRs + teammates`, or skip auto-discovery entirely and register a single PR by URL.
92
+
93
+ ### Interfaces
94
+
95
+ oh-my-pr can be used in a few ways:
96
+
97
+ - terminal UI: `oh-my-pr`
98
+ - web dashboard: `oh-my-pr web`
99
+ - MCP server: `oh-my-pr mcp`
100
+ - local REST API: see [LOCAL_API.md](LOCAL_API.md)
101
+ - optional Tauri desktop shell
102
+
103
+ ### Optional Automation
104
+
105
+ If you enable them, oh-my-pr can also:
106
+
107
+ - attempt bounded CI healing for failing PR heads
108
+ - monitor merged deployments and open follow-up fix PRs for supported Vercel and Railway failures
109
+ - create GitHub releases automatically for merged changes that are worthy of a new version
110
+ - answer natural-language questions about tracked PRs through the dashboard or MCP
111
+
112
+ Those features are optional and documented in the linked docs below.
113
+
114
+ ## Commands
78
115
 
79
116
  ```bash
80
- oh-my-pr Launch the terminal UI (default)
81
- oh-my-pr web Start the web dashboard server (opens browser)
82
- oh-my-pr mcp Start the MCP server for Claude Desktop / OpenClaw
83
- oh-my-pr --help Show help message
84
- oh-my-pr --version Print the version
117
+ oh-my-pr # terminal UI
118
+ oh-my-pr web # web dashboard
119
+ oh-my-pr mcp # MCP server
120
+ oh-my-pr --help # help
121
+ oh-my-pr --version # version
85
122
  ```
86
123
 
87
124
  Set `PORT` to change the default web server port (`5001`).
88
125
 
89
- ### Run From Source
126
+ ## Run From Source
90
127
 
91
128
  ```bash
92
129
  git clone https://github.com/yungookim/oh-my-pr.git
@@ -95,17 +132,7 @@ npm install
95
132
  npm run dev
96
133
  ```
97
134
 
98
- The dashboard is served on port `5001` by default. All `/api/*` routes are restricted to loopback callers.
99
-
100
- ## MCP and API
101
-
102
- Oh-my-pr exposes the same local system through REST and MCP.
103
-
104
- ```bash
105
- oh-my-pr mcp
106
- ```
107
-
108
- Use it with MCP hosts such as Claude Desktop or OpenClaw, or call the REST API directly from local tooling. Full endpoint and tool docs live in [LOCAL_API.md](LOCAL_API.md).
135
+ The dashboard is available at `http://localhost:5001` by default. All `/api/*` routes are restricted to loopback callers.
109
136
 
110
137
  ## Docs
111
138
 
@@ -114,6 +141,7 @@ Use it with MCP hosts such as Claude Desktop or OpenClaw, or call the REST API d
114
141
  - [Agent Dispatch](docs/public/agent-dispatch.md)
115
142
  - [Configuration](docs/public/configuration.md)
116
143
  - [Local API and MCP](LOCAL_API.md)
144
+ - [Contributing](CONTRIBUTING.md)
117
145
 
118
146
  ## Development
119
147
 
@@ -129,21 +157,6 @@ Use it with MCP hosts such as Claude Desktop or OpenClaw, or call the REST API d
129
157
  | `npm run tauri:dev` | Start the Tauri desktop app in development |
130
158
  | `npm run tauri:build` | Build the Tauri desktop app |
131
159
 
132
- ## Local State
133
-
134
- By default Code Factory stores its runtime data in `~/.oh-my-pr`:
135
-
136
- - `state.sqlite` for durable app state, runtime flags, background jobs, questions, releases, and changelogs
137
- - `log/` for mirrored activity logs
138
- - `repos/` for app-owned repository caches
139
- - `worktrees/` for isolated PR worktrees
140
-
141
- Set `OH_MY_PR_HOME` to override the root path. The legacy `CODEFACTORY_HOME` name is still supported for compatibility.
142
-
143
- ## Contributing
144
-
145
- See [CONTRIBUTING.md](CONTRIBUTING.md).
146
-
147
160
  ## License
148
161
 
149
162
  [MIT](LICENSE) Copyright 2026 KimY