Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

feat: Configurable remote (fix #19)#44

Open
cjrh wants to merge 3 commits into
clabby:mainfrom
cjrh:cjrh/configurable_remote
Open

feat: Configurable remote (fix #19)#44
cjrh wants to merge 3 commits into
clabby:mainfrom
cjrh:cjrh/configurable_remote

Conversation

@cjrh
Copy link
Copy Markdown

@cjrh cjrh commented Aug 8, 2025

No description provided.

@cjrh
Copy link
Copy Markdown
Author

cjrh commented Aug 8, 2025

📚 $\text{Stack Overview}$

Pulls submitted in this stack:

This comment was automatically generated by st.

@cjrh
Copy link
Copy Markdown
Author

cjrh commented Aug 8, 2025

Thank you for making this tool ❤️

The vast majority of my repos use the forking model. This means that I usually create branches on my fork, say origin, but create pull requests on an upstream remote, say upstream. I've added settings to enable this workflow. It is opt-in during StackTree configuration.

I created this pull request using this pull request. That's kind of fun to say.

Repo configuration

User is asked whether to use a single remote or two remotes (for the fork model)

Screenshot from 2025-08-08 15-53-00

Forking model requires two remotes for selection

Screenshot from 2025-08-08 15-53-27

During submit

During submit there is feedback about the remotes being used

Screenshot from 2025-08-08 15-57-12

@cjrh
Copy link
Copy Markdown
Author

cjrh commented Aug 8, 2025

This is my ./.git/.st_store.toml currently, so you can see the settings:

trunk-name = "main"
pr-remote = "upstream"
push-remote = "origin"

[branches.main]
name = "main"
children = ["cjrh/configurable_remote"]

[branches."cjrh/configurable_remote"]
name = "cjrh/configurable_remote"
parent-oid-cache = "88ae3165958d695b454d8945cafbd9c54057369d"
parent = "main"
children = []

[branches."cjrh/configurable_remote".remote]
pr-number = 44
comment-id = 3168011745

@cjrh cjrh mentioned this pull request Aug 8, 2025
@cjrh
Copy link
Copy Markdown
Author

cjrh commented Aug 8, 2025

I got an error trying to make another PR stacked on this one. So I'm looking at that now.

@cjrh
Copy link
Copy Markdown
Author

cjrh commented Aug 8, 2025

It turns out my idea cannot work. There are fundamental problems:

You cannot create true stacked PRs across repositories on Github because:

  1. Cross-repository PRs can only target branches that exist on the upstream repository
  2. Fork branches don't exist on upstream by default
  3. GitHub doesn't support cross-repo base branches from forks

So I'll change this PR back to simply allowing the remote to be configurable.

😢

@cjrh cjrh changed the title feat: Configurable remotes (fix #19) feat: Configurable remote (fix #19) Aug 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant