Skip to content

feat: add GitHub PR workflows#2

Merged
mark-pro merged 5 commits intomainfrom
codex/pr-gh-cli-flow
Mar 26, 2026
Merged

feat: add GitHub PR workflows#2
mark-pro merged 5 commits intomainfrom
codex/pr-gh-cli-flow

Conversation

@mark-pro
Copy link
Copy Markdown
Member

@mark-pro mark-pro commented Mar 26, 2026

Adds GitHub PR creation, tracking, listing, and browser integration to dig.

This pull request introduces comprehensive support for GitHub pull request (PR) management directly within the dig CLI, allowing users to create, adopt, view, and list tracked PRs for their branches. The changes update the documentation, CLI interface, core data structures, and rendering logic to integrate PR tracking into the workflow, including annotating branches in the stack tree with PR numbers.

The most important changes include:

GitHub Pull Request Integration:

  • Added a new dig pr command to the CLI, enabling users to create or adopt a GitHub PR for the current tracked branch, open the PR in the browser, or list all tracked open PRs in stack order. This is implemented in the new src/cli/pr/mod.rs module, which handles argument parsing, command execution, and output formatting.
  • Updated README.md with detailed documentation and usage examples for the new PR commands, including how PRs are tracked and displayed. [1] [2] [3]

CLI and Rendering Updates:

  • Updated the CLI command dispatcher in src/cli/mod.rs to include the new pr subcommand and its argument structure. [1] [2] [3]
  • Enhanced the stack tree rendering in src/cli/tree/render.rs to annotate branches with their associated PR numbers (e.g., feat/auth (#42)), including updates to test cases to verify correct rendering. [1] [2] [3] [4]

Core Data Structure Changes:

  • Extended branch and adoption logic to store an optional pull_request field in branch tracking metadata, enabling persistent association between branches and their PRs. [1] [2] [3] [4]
  • Added a new BranchPushTarget struct in src/core/git.rs to encapsulate remote push target information, supporting the PR creation workflow.

@mark-pro mark-pro marked this pull request as ready for review March 26, 2026 13:57
@mark-pro mark-pro merged commit 32bf5b6 into main Mar 26, 2026
1 check passed
@mark-pro mark-pro deleted the codex/pr-gh-cli-flow branch March 26, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant