Skip to content

feat(pr): open GitHub pull requests in dedicated worktrees - #28

Merged
Stephanvs merged 1 commit into
mainfrom
codex/pr-worktrees
Oct 28, 2026
Merged

Stephanvs merged 1 commit into
mainfrom
codex/pr-worktrees

Conversation

@Stephanvs

Copy link
Copy Markdown
Owner

Reviewing a GitHub PR locally currently requires resolving its branch and creating a worktree manually. Add hypr pr <number-or-url> to fetch the PR head into a dedicated pr-<number> branch and open it with the configured terminal and setup hooks.

Supports forked PRs through the base repository's PR ref, validates that the PR repository matches a configured remote, and rejects unrelated branch collisions. Reopening preserves local commits and uncommitted changes; it does not update to newer PR revisions. Options include --dir, --terminal, --after-init, and --yes.

Shares directory generation with switch, passes subprocess arguments through ArgumentList, and documents the command.

Validation: dotnet test --no-restore passed with 112 tests and 2 platform skips. New tests exercise actual Git repositories for PR fetching, reopening with local changes, branch collisions, and missing PR refs. CLI help and git diff --check passed. A live GitHub checkout was not exercised.

@Stephanvs
Stephanvs merged commit 2888363 into main Oct 28, 2026
4 checks passed
@Stephanvs Stephanvs added the enhancement New feature or request label Oct 28, 2026 — with ChatGPT Codex Connector
@Stephanvs
Stephanvs deleted the codex/pr-worktrees branch October 28, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant