diff --git a/.opencode/command/pr.md b/.opencode/command/pr.md index 129c7e0..3c9332a 100644 --- a/.opencode/command/pr.md +++ b/.opencode/command/pr.md @@ -43,8 +43,18 @@ git log @{upstream}..HEAD --oneline 2>/dev/null ### Step 4: Collect commits +**Important:** `git log main..HEAD` is unreliable when previous PRs were squash-merged — it will include commits whose changes are already on main. Instead, use `git cherry` to find only commits not yet merged: + +```bash +git cherry -v origin/main HEAD +``` + +This outputs lines prefixed with `+` (unmerged) or `-` (already merged). Only use `+` lines. The format is `+ `. + +For each unmerged commit, get the full details: + ```bash -git log main..HEAD --format='%s%n%b%n---' +git log -1 --format='%s%n%b%n---' ``` Parse each commit: diff --git a/README.md b/README.md index 791f74f..e69b3a8 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,16 @@ Run these checks (don't ask the user, just detect): ```bash command -v bun >/dev/null 2>&1 && echo "bun=$(bun --version)" || echo "bun=missing" +command -v brew >/dev/null 2>&1 && echo "brew=found" || echo "brew=missing" command -v opencode >/dev/null 2>&1 && echo "opencode=found" || echo "opencode=missing" command -v tmux >/dev/null 2>&1 && echo "tmux=found" || echo "tmux=missing" command -v pulse >/dev/null 2>&1 && echo "pulse=already-installed" || echo "pulse=not-installed" ``` -- bun missing → Tell the user to install Bun first (https://bun.sh) and stop. +- bun missing + brew found → Ask: "Bun is required but not installed. Install it + with `brew install oven-sh/bun/bun`?" If yes, run it and continue. If no, stop. +- bun missing + brew missing → Tell the user to install Bun first + (https://bun.sh) and stop. - opencode missing → Warn that OpenCode is needed, but proceed with installation. ### Step 2: Add the plugin to OpenCode config