Need to disable Stacked PRs org wide #209281
🏷️ Discussion TypeProduct Feedback BodyWe have a workflow that strictly prohibits stacked PRs, and we don't think GitHub should force stacked PRs on our developers. Not having org-wide and repository-level settings for stacked PRs puts GitHub in the position of dictating how we do business. Git Flow, trunk-based development- these long-used patterns do not allow for this stacking practice, and for us, it is an anti-pattern. Requiring me to put actions in place across every repository to prevent new developers and contractors from using this GitHub feature is an unreasonable burden. |
Replies: 2 comments 2 replies
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
@znorris there's no switch for it today: the docs say stacked PRs "require no setup or enablement". What you can do org-wide, without touching every repo, is an organization ruleset with Require workflows to pass before merging pointing to one central workflow that fails when the PR belongs to a stack. name: no-stacked-prs
on: pull_request
jobs:
block:
runs-on: ubuntu-latest
steps:
- if: github.event.pull_request.stack != null
run: |
echo "Stacked pull requests are not allowed in this organization."
exit 1Developers can still open a stack, but none of its PRs can merge. Organization rulesets need GitHub Team or Enterprise, and the workflow repo must match the visibility of the repos it runs on. Docs:
If this solves it, please mark it as the answer so others can find it. |
@znorris there's no switch for it today: the docs say stacked PRs "require no setup or enablement". What you can do org-wide, without touching every repo, is an organization ruleset with Require workflows to pass before merging pointing to one central workflow that fails when the PR belongs to a stack.
github.event.pull_request.stackis only present on stacked PRs:Developers can still open a stack, but none of its PRs can merge. Organizatio…