Skip to content
Discussion options

You must be logged in to vote

Yes and yes! There is a stack object included in all pull_request webhook events. And there is a new stacked event that fires when a PR is added to a stack. More on this here: https://github.github.com/gh-stack/reference/webhooks/

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Run for the lowest unmerged PR in the stack
        if: github.event.pull_request.stack.base.ref == github.event.pull_request.base.ref
        run: echo "Lowest unmerged PR in the stack"

      - name: Run for the top PR in the stack
        if: github.event.pull_request.stack != null && github.event.pull_request.stack.position == github.event.pull_request.stack…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jasondamour
Comment options

Answer selected by skarim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants