The Crystal Programming Language Forum

Pull requests against branches

Yesterday I published PR #9731 which was depending on #9367 to be merged first.
In a comment on that PR @asterite suggested to base this branch on the prerequisite branch to make it show only the changes relative to that:

You can base this branch on the other branch in the PR. Then only the relevant commits will be shown. And when the other PR is merged and the branch is deleted, theis PR’s target branch will change to master automatically

Unfortunately, this doesn’t seem work when the base branch is on a different repo. I published it to my fork at straight-shoota:refactor/spec_helper, but when trying to make a pull request against that, the PR is opened on the fork (see for an example).

I have since then hidden the comments on #9731 because they’re not related to the specific PR. This is the place where this discussion should be continued.

Are there any suggestions no how this could be made to work?
It would certainly work if I pushed the base branch directly to the crystal-lang repo and made the original PR for that branch. But that has some disadvantages: I prefer to push feature branches to my fork to have them isolated and not interfere with branches from other contributers. And you need to have push access to the crystal-lang repo in the first place, i.e. only works for core members.

I had the exact same findings, nothing else better.

There’s probably no better way to preview the entire branch than opening a draft PR with all the changes and updating that one as the smaller ones are merged.

1 Like