Skip to content

Support configurable remote and fork workflows #4

@dezren39

Description

@dezren39

Problem

The remote is hardcoded to "origin" in StackState::new(). There is no way to change it after ez init, and no fork/upstream model exists. In fork-based workflows (common in open source), users need to:

  • Push branches to their fork remote (e.g. fork) while targeting PRs against upstream (origin)
  • Override the remote per-push or per-branch
  • Pass --repo to gh pr create so PRs target the correct repository

Current behavior

  • state.remote is always "origin"
  • push.rs calls gh pr create without --repo, so gh decides the target repo
  • No CLI flag or config to change the remote after init
  • No per-branch or per-push remote override

Proposed solution

  1. Add remote field to .git/ez/stack.json (defaulting to "origin" for backward compat)
  2. Add ez config set remote <name> or ez init --remote <name> to change it
  3. Add --remote flag to ez push and ez submit for per-invocation override
  4. Add --repo passthrough to gh pr create calls so fork users can target upstream
  5. Consider a fork_remote / upstream_remote pair for full fork model

Related

  • Fork workflows are the primary use case for stacked PRs in open-source contributions
  • ez adopt already fetches from state.remote, so changing it would affect adopt too

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions