I have the GitHub action that should only be ran when the commit message contains 'test_api'. However, I do want it to be a required check for the PR to be able to get merged. For some reason this is not picked up, and it does not make any sense to me.
jobs:
api-tests:
if: contains(github.event.commits[0].message, '[test_api]')
runs-on: ubuntu-latest
...