Skip to content
Discussion options

You must be logged in to vote

@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.stack is only present on stacked PRs:

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 1

Developers can still open a stack, but none of its PRs can merge. Organizatio…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@znorris
Comment options

@remiflament
Comment options

Answer selected by znorris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pull Requests Propose, review, and discuss changes to a repository's codebase Product Feedback Share your thoughts and suggestions on GitHub features and improvements Welcome 🎉 Used to greet and highlight first-time discussion participants. Welcome to the community! source:ui Discussions created via Community GitHub templates
3 participants