At the moment, in order to do stacked PRs (i.e. a sequence of PRs that depend on each other), we rely on third party options such as Graphite, which is not ideal.
GitHub appear to be previewing a new stacked PR workflow that is native to the environment. See GitHub Stacked PRs | GitHub Stacked PRs . It’s a private preview situation, so repos have to request access and then sit on a waiting list to gain the functionality. Does anybody have any experience with them in another repository? If so, is it worth us requesting access for LLVM?
Worth noting that GitHub is slapping a UI here, without addressing the main limitation we face with stacked PRs today: they can’t be used from a fork (which is why we have to keep user branches in the main repo today).
It may still be a welcome improvement for StackedPR UI, and remove dependencies on tooling or manual bookkeeping, but just mentioning in case some may not have read the fine prints!
Stacked PRs has been enabled for all repositories under llvm. You can find documentation and getting started guides here: GitHub Stacked PRs | GitHub Stacked PRs. Regular pull requests will continue to work as they do today, so users who are not creating stacks should not see any changes. Please share any feedback or questions here: github/gh-stack · Discussions · GitHub.
I’m noticing that it doesn’t appear possible to bypass merge requirements for stacked PRs. Initially, I wasn’t sure if that was a configuration issue or an issue with Github’s implementation. I found Bypass merge requirements not working on stacked PRs · github/gh-stack · Discussion #186 · GitHub which suggests it may be the latter. Putting it here in case anyone else runs into this too.
This seems like a moment where it would be useful to have a frivolous test repository under llvm-project, containing nothing important, so that people could open test PR stacks in it and get used to the mechanics of the new tooling, without making a huge mess in the real LLVM repo if they get it wrong.
(If the stacked PR tool were not restricted-access, of course, anyone could make their own test repo and throw it away once they were done!)
Am I doing it wrong? I have two branches on my fork, I create a PR into main for the first branch, then create a PR in my fork for my second branch into my first branch, but there’s no UI for creating a stack as described at Stacked PRs in the GitHub UI | GitHub Stacked PRs . FAQ | GitHub Stacked PRs suggests it’s just not supported?
The footer that gh stack automatically adds to the PR summary won’t be automatically trimmed when squashing and merging, so make sure you remove it manually, otherwise your merged commit message will have
---
<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
I don’t have access to create a user branch in the monorepo as far as I can tell. users/iana/test said no. I do have merge access, is it typical that I wouldn’t have branch creation access in users too?
If you have commit access, you should be able to create branches under the users/ namespace. This is likely on authentication problem on your end (repo-scoped token specific to your fork?).