Actions on Pull Request against another Pull Request?

Hi!

We’re using GitHub Actions to run our test suite. Here’s our config:

on:
  push:
    branches:
      - develop
      - master
      - release/*
      - "*-stable"
  pull_request:
    branches:
      - "*"

This has been working fine for us until now. We have to add a big feature, so wer thought about splitting it into different PRs. We’d create a base PR for the whole feature, then smaller PRs against that base PR.

Base PR: https://github.com/decidim/decidim/pull/5925

Smaller PR: https://github.com/decidim/decidim/pull/5924

(note the base branches on each PR; base branch was created later)

The problem is that we don’t get any check for the smaller PR, it doesn’t seem to be firing.

Any idea what’s going on and how to fix the config so the tests run?

Thanks!

@mrcasals ,

I noticed that you are using the below configuration in your workflow:

on:
  pull_request:
    branches:
      - "*"

The branches filter pattern ‘*’ only matches the branch names that don’t contain a slash (/). This is the root cause of the problem you are facing.

If you want to match all branch names, include the names that contain slashes (/), you can use one of the below two configurations:

on:
  pull_request:
    branches:
      - "**"

because  ‘**’ is default branches filter pattern when you don’t set any branches filter, so you also can directly use,

on:
  pull_request:

More details, you can reference here: https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#patterns-to-match-branches-and-tags

Ah, I missed that section, thank you very much!